::8088: bind: address already in use, port issues[Solved]

Hi guys

I saw similar issues and tried all the approaches proposed, however I am still running into troubles with the bind-address as others have also documented on Github Issue 8912.
Running InfluxDB v1.6.4 (git: 1.6 c75cdfdfa6f71a08473fefcec71f6cbcbdef1ff4)

The error at hand is that I can’t access via http (neither locally via influx nor remotely via curl).

$ influx
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp [::1]:8086: connect: connection refused
Please check your connection settings and ensure 'influxd' is running.

$ influxd
2018-10-27T22:00:37.028951Z	info	InfluxDB starting	{"log_id": "0BPtXse0000", "version": "1.6.4", "branch": "1.6", "commit": "c75cdfdfa6f71a08473fefcec71f6cbcbdef1ff4"}
2018-10-27T22:00:37.029104Z	info	Go runtime	{"log_id": "0BPtXse0000", "version": "go1.10.3", "maxprocs": 4}
run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in use
  • When checking who exactly is “already using” 8088, I could locate influxd (via netstat -ltpne, lsof |grep inode as proposed here)

Checking status

sudo systemctl status influxdb
● influxdb.service - InfluxDB is an open-source, distributed, time series database
   Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-10-27 21:32:57 UTC; 33min ago
     Docs: https://docs.influxdata.com/influxdb/
 Main PID: 2072 (influxd)
   CGroup: /system.slice/influxdb.service
           └─2072 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.545966Z lvl=info msg="Starting continuous query service" log_id=0BPrxaCl000 service=continuous_q
Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.546013Z lvl=info msg="Starting HTTP service" log_id=0BPrxaCl000 service=httpd authentication=fal
Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.546042Z lvl=info msg="opened HTTP access log" log_id=0BPrxaCl000 service=httpd path=stderr
Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.546306Z lvl=info msg="Listening on HTTP" log_id=0BPrxaCl000 service=httpd addr=172.10.15.20:8086
Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.546399Z lvl=info msg="Starting retention policy enforcement service" log_id=0BPrxaCl000 service=
Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.547221Z lvl=info msg="Storing statistics" log_id=0BPrxaCl000 service=monitor db_instance=_intern
Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.547770Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0BPrxaCl000
Oct 27 21:32:57 node601 influxd[2072]: ts=2018-10-27T21:32:57.550382Z lvl=info msg="Listening for signals" log_id=0BPrxaCl000
Oct 27 22:02:57 node601 influxd[2072]: ts=2018-10-27T22:02:57.547892Z lvl=info msg="Retention policy deletion check (start)" log_id=0BPrxaCl000 service=retent
Oct 27 22:02:57 node601 influxd[2072]: ts=2018-10-27T22:02:57.548940Z lvl=info msg="Retention policy deletion check (end)" log_id=0BPrxaCl000 service=retentio

So far I’ve tried

  • starting influxd manually or with systemd
  • fully reinstalling which was also outlined by other users in Github Issue 8912 (new users cant put more than two links :slight_smile:)

Below is the output of influxd config, the first two parameters aren’t passed by my config file (above [meta]) which is why they’re being merged.

Merging with configuration at: /etc/influxdb/influxdb.conf
reporting-disabled = false
bind-address = "127.0.0.1:8088"

[meta]
  dir = "/var/lib/influxdb/meta"
  retention-autocreate = true
  logging-enabled = true

[data]
  dir = "/var/lib/influxdb/data"
  index-version = "inmem"
  wal-dir = "/var/lib/influxdb/wal"
  wal-fsync-delay = "0s"
  query-log-enabled = true
  cache-max-memory-size = 1073741824
  cache-snapshot-memory-size = 26214400
  cache-snapshot-write-cold-duration = "10m0s"
  compact-full-write-cold-duration = "4h0m0s"
  max-series-per-database = 1000000
  max-values-per-tag = 100000
  max-concurrent-compactions = 0
  max-index-log-file-size = 1048576
  trace-logging-enabled = false
  tsm-use-madv-willneed = false

[coordinator]
  write-timeout = "10s"
  max-concurrent-queries = 0
  query-timeout = "0s"
  log-queries-after = "0s"
  max-select-point = 0
  max-select-series = 0
  max-select-buckets = 0

[retention]
  enabled = true
  check-interval = "30m0s"

[shard-precreation]
  enabled = true
  check-interval = "10m0s"
  advance-period = "30m0s"

[monitor]
  store-enabled = true
  store-database = "_internal"
  store-interval = "10s"

[subscriber]
  enabled = true
  http-timeout = "30s"
  insecure-skip-verify = false
  ca-certs = ""
  write-concurrency = 40
  write-buffer-size = 1000

[http]
  enabled = true
  bind-address = "172.10.15.20:8086"
  auth-enabled = false
  log-enabled = true
  suppress-write-log = false
  write-tracing = false
  pprof-enabled = false
  debug-pprof-enabled = false
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"
  https-private-key = ""
  max-row-limit = 10000
  max-connection-limit = 0
  shared-secret = ""
  realm = "InfluxDB"
  unix-socket-enabled = false
  unix-socket-permissions = "0777"
  bind-socket = "/var/run/influxdb.sock"
  max-body-size = 25000000
  access-log-path = ""
  max-concurrent-write-limit = 0
  max-enqueued-write-limit = 0
  enqueued-write-timeout = 30000000000

[logging]
  format = "auto"
  level = "info"
  suppress-logo = false

[ifql]
  enabled = false
  log-enabled = true
  bind-address = ":8082"

[[graphite]]
  enabled = false
  bind-address = ":2003"
  database = "graphite"
  retention-policy = ""
  protocol = "tcp"
  batch-size = 5000
  batch-pending = 10
  batch-timeout = "1s"
  consistency-level = "one"
  separator = "."
  udp-read-buffer = 0

[[collectd]]
  enabled = false
  bind-address = ":25826"
  database = "collectd"
  retention-policy = ""
  batch-size = 5000
  batch-pending = 10
  batch-timeout = "10s"
  read-buffer = 0
  typesdb = "/usr/share/collectd/types.db"
  security-level = "none"
  auth-file = "/etc/collectd/auth_file"
  parse-multivalue-plugin = "split"

[[opentsdb]]
  enabled = false
  bind-address = ":4242"
  database = "opentsdb"
  retention-policy = ""
  consistency-level = "one"
  tls-enabled = false
  certificate = "/etc/ssl/influxdb.pem"
  batch-size = 1000
  batch-pending = 5
  batch-timeout = "1s"
  log-point-errors = true

[[udp]]
  enabled = false
  bind-address = ":8089"
  database = "udp"
  retention-policy = ""
  batch-size = 5000
  batch-pending = 10
  read-buffer = 0
  batch-timeout = "1s"
  precision = ""

[continuous_queries]
  log-enabled = true
  enabled = true
  query-stats-enabled = false
  run-interval = "1s"

[tls]
  min-version = ""
  max-version = ""

Checking ports

ss -lntu
Netid  State      Recv-Q Send-Q                               Local Address:Port                                              Peer Address:Port
tcp    LISTEN     0      128                                   172.10.15.20:8086                                                         *:*
tcp    LISTEN     0      128                                              *:22                                                           *:*
tcp    LISTEN     0      128                                      127.0.0.1:8088                                                         *:*
tcp    LISTEN     0      128                                             :::22                                                          :::*

Does that mean InfluxDB is somehow started twice? Since it claims ports are occupied but they seem to be listening. (Pgrep influx shows only one process though)

Any hints are appreciated. Been banging my head on this for the past week.

EDIT 7: I just tried out running without any custom configuration (everything commented out, otherwise influxdb wants a valid config file) and still the same error pops up. run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in use)

EDIT 8: Downgraded manually to 1.6.3, tried running without custom config – still same error pops up. run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in use), however, now I can connect to the local :8086 influxdb shell via influx.
Another strange thing, no matter to which port I change the bind-address, it keeps failing with the same error message.

EDIT 9: Now it works. The downgrading to 1.6.3 might have done the trick. Seems to be some kind of bug in 1.6.4

1 Like