InfluxDB config file not being picked up correctly during init/boot

First, apologies in advance, this may be a long post as I’ve been trying to solve if for some time now.
Config: running InfluxDB 1.4 on Ubuntu 16.04 54bit AWS instance (2 actually w/same issue). Have elastic IP’s setup, EBS for storage.

Due to corporate & gov restrictions on IP ports I modified the influxdb.conf file to enable HTTP and bind HTTP to port 80.

  1. Changed HTTP enable and HTTP binding in influxdb to enable & port 80
  2. Reboot/init the system and influxd is not started
  3. Will not start up using ‘sudo service influxd start’.
  4. Can start manually with ‘sudo influxd -config /etc/influxdb/influxdb.conf &’ and can start influx client using -port 80.
  5. Change influxdb.conf back to original, reboot, influxd running, and able to connect to standard port 8086
  6. Stop influxd using ‘sudo service influxd stop’
  7. Change influxd.conf file back to use HTTP port 80 & started using ‘sudo service influxd start’ and influx did not star
  8. Started influxd manually ‘sudo influxd &’ and influxd started and able to connect with influx client (and curl cmd ‘curl -i http://localhost:80/ping
  9. Change influxdb.conf back to original (e.g. HTTP port 8086). Set environment variables for http (export INFLUXDB_HTTP_ENABLED = “true” and INFLUXDB_HTTP_BIND_ADDRESS=“:80”) in .bashrc and rebooted
  10. Influxd started and ‘influxd config’ shows binding to port 80 (matchign env vars)
  11. But could connect influx to 80 or do curl to 80; but able to connect & curl using port 8086.

Bottom line, looks like if I change the influxdb.conf file to bind http to port 80 the service will not start, but I can start it manually. Environment variables don’t seem to work either. It’s almost as if influxd, when starting as a service at boot, sees a different parameter value from its default, it won’t start. Or, it picks up the change, but doesn’t apply it.

I’ve tried all sorts of combinations of starting influx with the changes and am just out of ideas. So any help would be appreciated.


If you’re able to start it on port 80 manually with sudo influxd, then I’m guessing the problem is that the influxdb user associated with the service does not have the privilege to bind to privileged ports.

Here’s a SuperUser discussion on how to allow a generic process to bind to port 80: linux - Allow non-root process to bind to port 80 and 443? - Super User

If you’re still having trouble after that, we’ll need to see the logs for when influxd “will not start”, in order to troubleshoot further.


Thanks, that was the problem. Not being a Linux admin type, didn’t know about the lower ip ports being ‘privileged’. I used the setcap utility to grant permission for the influxd binary to use port 80 (sudo setcap CAP_NET_BIND_SERVICE=+eip /user/bin/inlfuxd) to grant privilege and was able to reboot and influx started up using port 80. One caveat though, if you do an update/upgrade (e.g. apt-get update/upgrade) and the binary is updated, then the privilege is lost. I suspect that the privilege is associated with a binary version or date, and if you change that then you need to grant privileges again.