# InfluxDB 2, Telegraf on Docker with HTTPS

**URL:** <https://community.influxdata.com/t/influxdb-2-telegraf-on-docker-with-https/12498>\
**Category:** InfluxDB 2\
**Created:** [January 3, 2020, 9:19am UTC](https://community.influxdata.com/t/influxdb-2-telegraf-on-docker-with-https/12498 "2020-01-03T09:19:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wijkjh](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/wijkjh/32/4165_2.png) [@wijkjh](https://community.influxdata.com/u/wijkjh)\
**Post date:** [January 3, 2020, 9:19am UTC](https://community.influxdata.com/t/influxdb-2-telegraf-on-docker-with-https/12498/1 "2020-01-03T09:19:54Z")

</div>

I use a Docker compose file with both InfluxDB 2 and Telegraf and generated certificates as mentioned in the documentation but I do not get it to work with HTTPS.  
Also pinging as stated in the documentation on https does not work. It does work on https, but I need to supply a token (which is not mentioned) in the documentation:  
curl -vk [http://127.0.0.1:9999/api/v2/ping](http://127.0.0.1:9999/api/v2/ping) -H “Authorization: Token xxxxx”

_docker-compose.yaml:_  
version: “3.1”  
services:  
influxdb:  
container\_name: influxdb  
ports:  
- ‘9999:9999’  
image: ‘[Quay](http://quay.io/influxdb/influxdb:2.0.0-alpha)’  
restart: always  
environment:  
- INFLUX\_TOKEN=“xxxx”  
volumes:  
- influxdb:/var/lib/influxdb2  
- /etc/ssl:/etc/ssl  
command: influxd run --bolt-path /var/lib/influxdb2/influxd.bolt --engine-path /var/lib/influxdb2/engine --store bolt   
–reporting-disabled influxd   
–tls-cert “/etc/ssl/influxdb-selfsigned.crt”   
–tls-key “/etc/ssl/influxdb-selfsigned.key”

```
telegraf:
  container_name: telegraf
  image: 'telegraf'
  restart: always
  environment:
    - INFLUX_TOKEN="xxxxx
  volumes:
    - telegraf:/etc/telegraf

```

volumes:  
influxdb:  
telegraf:

Any suggestions what I am doing wrong?  
Can I see if the certifcates are used or not? docker logs influxdb does not show anything.

Some log lines:  
ts=2020-01-03T09:13:58.364552Z lvl=info msg=“Welcome to InfluxDB” log\_id=0K6flmN0000 version=2.0.0-alpha.21 commit=8e8cfc729 build\_date=2019-12-13T21:51:29Z  
ts=2020-01-03T09:13:58.367569Z lvl=info msg=“Resources opened” log\_id=0K6flmN0000 service=bolt path=/var/lib/influxdb2/influxd.bolt  
ts=2020-01-03T09:13:58.377723Z lvl=info msg=“Opening Series File (start)” log\_id=0K6flmN0000 service=storage-engine service=series-file op\_name=series\_file\_open path=/var/lib/influxdb2/engine/\_series op\_event=start  
ts=2020-01-03T09:13:58.384609Z lvl=info msg=“Opening Series File (end)” log\_id=0K6flmN0000 service=storage-engine service=series-file op\_name=series\_file\_open path=/var/lib/influxdb2/engine/\_series op\_event=end op\_elapsed=6.888ms  
ts=2020-01-03T09:13:58.398496Z lvl=info msg=“Index opened” log\_id=0K6flmN0000 service=storage-engine index=tsi partitions=8  
ts=2020-01-03T09:13:58.399538Z lvl=info msg=“Opened file” log\_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000019-000000001.tsm id=4 duration=0.176ms  
ts=2020-01-03T09:13:58.399566Z lvl=info msg=“Opened file” log\_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000016-000000002.tsm id=1 duration=0.175ms  
ts=2020-01-03T09:13:58.400087Z lvl=info msg=“Opened file” log\_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000017-000000001.tsm id=2 duration=0.460ms  
ts=2020-01-03T09:13:58.400494Z lvl=info msg=“Opened file” log\_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000008-000000002.tsm id=0 duration=0.759ms  
ts=2020-01-03T09:13:58.400509Z lvl=info msg=“Opened file” log\_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000018-000000001.tsm id=3 duration=0.275ms  
ts=2020-01-03T09:13:58.400932Z lvl=info msg=“Reading file” log\_id=0K6flmN0000 service=storage-engine path=/var/lib/influxdb2/engine/wal/\_00038.wal size=8818304  
ts=2020-01-03T09:14:00.566844Z lvl=info msg=“Reloaded WAL” log\_id=0K6flmN0000 service=storage-engine path=/var/lib/influxdb2/engine/wal duration=2166.134ms  
ts=2020-01-03T09:14:00.566896Z lvl=info msg=Starting log\_id=0K6flmN0000 service=storage-engine component=retention\_enforcer check\_interval=1h  
ts=2020-01-03T09:14:00.567090Z lvl=info msg=“Starting query controller” log\_id=0K6flmN0000 service=storage-reads concurrency\_quota=10 initial\_memory\_bytes\_quota\_per\_query=9223372036854775807 memory\_bytes\_quota\_per\_query=9223372036854775807 max\_memory\_bytes=0 queue\_size=10  
ts=2020-01-03T09:14:00.855699Z lvl=info msg=Listening log\_id=0K6flmN0000 service=http transport=https addr=:9999 port=9999  
ts=2020-01-03T09:14:00.855702Z lvl=info msg=Starting log\_id=0K6flmN0000 service=telemetry interval=8h  
ts=2020-01-03T09:14:10.014189Z lvl=info msg=Unauthorized log\_id=0K6flmN0000 error=“authorization not found”  
ts=2020-01-03T09:14:10.858056Z lvl=error msg=“Unable to gather” log\_id=0K6flmN0000 error=“mime: no media type”  
ts=2020-01-03T09:14:20.003077Z lvl=info msg=Unauthorized log\_id=0K6flmN0000 error=“authorization not found”  
ts=2020-01-03T09:14:20.857939Z lvl=error msg=“Unable to gather” log\_id=0K6flmN0000 error=“mime: no media type”  
ts=2020-01-03T09:14:30.001857Z lvl=info msg=Unauthorized log\_id=0K6flmN0000 error=“authorization not found”  
ts=2020-01-03T09:14:30.859690Z lvl=error msg=“Unable to gather” log\_id=0K6flmN0000 error=“mime: no media type”  
ts=2020-01-03T09:14:40.001616Z lvl=info msg=Unauthorized log\_id=0K6flmN0000 error=“authorization not found”  
ts=2020-01-03T09:14:40.858221Z lvl=error msg=“Unable to gather” log\_id=0K6flmN0000 error=“mime: no media type”
