Problem
After installing InfluxDB, the systemd unit is unable to start and run when HTTPS is configured because the certificates are owned by the root user, and the systemd service fails to start.
Explanation
This is similar to this thread, but still different.
I was confused at first when running influx -config <path to config>
worked successfully, but systemctl start influxdb
always would fail. I was able to figure out the issue by…
- Looked at
journalctl
, saw permission denied on opening TLS certificate file - Looked at
influxdb.service
, noted it starts asinfluxdb
- Made copies of certificates, moved to
/etc/ssl
and changed permissions to belong toinfluxdb
- systemd service successfully starts
In the documentation, we’re told to set file permissions to root, but this seems like erroneous instructions. Is this a bug or is there a better way to go about doing this?
Thanks!