I have a Raspberry Pi with installed influx version 1.7.9
If I call “influxd” and I get " listen tcp 127.0.0.1:8088: bind: address already in use"
But I have write in the file “/etc/influxdb/influxdb.conf” → bind-address = “localhost:8087”
And when I call “influx” this error occured:
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.
Those two are from the active InfluxDB config file, which is used, and tell us
that the bind address was “127.0.0.1:8088” but has now been changed to
“localhost:8087”.
So long as you’ve restarted Influx since making that change, it should be
listening on port 8087.
Those don’t matter - the “services” file is just a definition of common names
for commonly-used port numbers.
What does that tell me now?
It suggests to me that there’s a difference between “127.0.0.1” and “localhost”
on this machine. It could be that “localhost” has both IPv4 and IPv6
addresses, or it could be that it’s not defined correctly at all.
Try the other command I suggested (I should have said “do this as well” rather
than “alternatively”…) ‘netstat -lptn’
And see what the output is.
Also check /etc/hosts for the definition of “localhost”.
Was there a particular reason you defined the InfluxDB bind address as
“localhost:8087” instead of “127.0.0.1:8087”?
The OpenHAB application install the influx db automatic, so I have not write “localhost”. But now I have changed all to 127.0.0.1.
But if I call “influx” this output occured:
[22:34:45] root@openHABianPi:/etc# 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.
Why “influx” command use the port 8086? I changed the port to 8087?
This is a message telling that your influxDb service is starting and pulling up the resources…
Just run : influxd -config /etc/influxdb/influxdb.conf
And then wait for sometime - 5 to 10 mins and monitor the logs
Your service should be up and running in sometime.