Run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in use

Hi,

Influxd server not running… it shows like this

2021-04-14T19:04:57.217578Z info InfluxDB starting {“log_id”: “0TWSCKWG000”, “version”: “1.8.4”, “branch”: “1.8”, “commit”: “bc8ec4384eed25436d31045f974bf39f3310fa3c”}
2021-04-14T19:04:57.217678Z info Go runtime {“log_id”: “0TWSCKWG000”, “version”: “go1.13.8”, “maxprocs”: 4}
run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in use

How to resolve this problem? I tried to change more ways. Still I can’t solve this after influxdb version up-gradation (1.5 → 1.8)…Current version 1.8.4

Something else is already listening on that port on that machine. Isn’t 8086 the default for Influxdb, how did you get 8088? Are you sure you stopped the last version? Do ‘netstat -aln | grep 8086’ and see what ports are being listened to.

1 Like

Hi, Thanks lot.

I tried, the problem not solved yet.

The influxdb configuration
#Bind address to use for the RPC service for backup and restore.

bind-address = “127.0.0.1:8088”

$ netstat -aln | grep 8086
… No output

$ netstat -aln | grep 8088
tcp 0 0 127.0.0.1:8088 0.0.0.0:* LISTEN

Any possible to way to solve this issue.

That output does mean something is listening on that port. Even if you don’t have influxdb running yet, 8088 is a pretty common default port for web servers to listen on. I didn’t know 8088 is used for backup and restore but I am not also using that feature just yet in my lab.

Try this command to get a better idea of what is listening on 8088.
sudo netstat -tulpn | grep LISTEN

Listening 8088 port → influxd

sudo netstat -tulpn | grep LISTEN
tcp 0 0 127.0.0.1:8088 0.0.0.0:* LISTEN 2367/influxd

So you still have influxdb running. See what version is running. Open your terminal and the command below. Are you trying to start it manually? I haven’t done the upgrade process myself since I am just running containers in a lab.

influxd version

Version is
InfluxDB v1.8.4
I trien running manually, it show like this, I’m not using containers

$influxd

8888888 .d888 888 8888888b. 888888b.
888 d88P" 888 888 "Y88b 888 "88b
888 888 888 888 888 888 .88P
888 88888b. 888888 888 888 888 888 888 888 888 8888888K.
888 888 "88b 888 888 888 888 Y8bd8P’ 888 888 888 "Y88b
888 888 888 888 888 888 888 X88K 888 888 888 888
888 888 888 888 888 Y88b 888 .d8"“8b. 888 .d88P 888 d88P
8888888 888 888 888 888 “Y88888 888 888 8888888P” 8888888P”

2021-04-15T16:24:17.597165Z info InfluxDB starting {“log_id”: “0TXaPPk0000”, “version”: “1.8.4”, “branch”: “1.8”, “commit”: “bc8ec4384eed25436d31045f974bf39f3310fa3c”}
2021-04-15T16:24:17.597413Z info Go runtime {“log_id”: “0TXaPPk0000”, “version”: “go1.13.8”, “maxprocs”: 4}
run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in us

     $ 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.

Used System Version
Raspberry Pi 3 B+
model name : ARMv7 Processor rev 4 (v7l)
OS Version
PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
VERSION_CODENAME=stretch
ID=raspbian

Which process name does “netstat -lptn” (as root) show you is listening on
port 8088?

Does it show you that anything at all is listening on port 8086?

Antony.

No Listen port (8086)

#netstat -lptn
shows only
tcp 0 0 127.0.0.1:8088 0.0.0.0:* LISTEN 3755/influxd

So, that is pretty clear-cut. You already have a running influxd process
listening on port 8088, which is why you cannot start another one.

Try “kill 3755” followed by starting influxd again.

Antony.

Thanks I tried to Kill PID

now showing another error like this…

run: open server: open tsdb store: mkdir /var/lib/influxdb/data/_internal/_se

After kill process, it show same error
Also I tried,

$ sudo systemctl start influxdb

$ sudo chown -R influxdb:influxdb /var/lib/influxdb/*

$influxd

2021-04-15T17:49:13.524393Z info InfluxDB starting {“log_id”: “0TXfGRi0000”, “version”: “1.8.4”, “branch”: “1.8”, “commit”: “bc8ec4384eed25436d31045f974bf39f3310fa3c”}
2021-04-15T17:49:13.524484Z info Go runtime {“log_id”: “0TXfGRi0000”, “version”: “go1.13.8”, “maxprocs”: 4}
run: open server: listen: listen tcp 127.0.0.1:8088: bind: address already in

This is repeated same error…I want my data back completely.

I do not see an error message there.

Please paste the entire message, and also the output of “influx” (note, no d at
the end) after trying to start the service.

Antony.

Please see this.

$ 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.

I don’t understand what you are trying to do.

You say you run the following command:

$ sudo systemctl start influxdb

Good, that should start the influxd service.

I’m not sure quite why you then do:

$ sudo chown -R influxdb:influxdb /var/lib/influxdb/*

However you then run the command (and not as root):

$ influxd

which of course complains that influxd is already running (you started it in
the first command).

What is surprising about the fact that the second time you try to run influxd
it tells you that the first instance is already bound to port 8088?

Why are you trying to run it a second time at all?

Antony.

So, you are starting influxd listening on port 8088 and then trying to connect
with the influx client to port 8086?

Antony.

Now I start from beginning
1.
$sudo netstat -lptn
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:8088 0.0.0.0:* LISTEN 4679/influxd
2.
$sudo kill 4679
3.

$influxd

2021-04-15T18:13:09.799677Z info InfluxDB starting {“log_id”: “0TXgd69l000”, “version”: “1.8.4”, “branch”: “1.8”, “commit”: “bc8ec4384eed25436d31045f974bf39f3310fa3c”}
2021-04-15T18:13:09.799787Z info Go runtime {“log_id”: “0TXgd69l000”, “version”: “go1.13.8”, “maxprocs”: 4}
2021-04-15T18:13:09.946770Z info Using data dir {“log_id”: “0TXgd69l000”, “service”: “store”, “path”: “/var/lib/influxdb/data”}
2021-04-15T18:13:09.947069Z info Compaction settings {“log_id”: “0TXgd69l000”, “service”: “store”, “max_concurrent_compactions”: 2, “throughput_bytes_per_second”: 50331648, “throughput_bytes_per_second_burst”: 50331648}
2021-04-15T18:13:09.947172Z info Open store (start) {“log_id”: “0TXgd69l000”, “service”: “store”, “trace_id”: “0TXgd6jl000”, “op_name”: “tsdb_open”, “op_event”: “start”}
2021-04-15T18:13:09.951670Z info Open store (end) {“log_id”: “0TXgd69l000”, “service”: “store”, “trace_id”: “0TXgd6jl000”, “op_name”: “tsdb_open”, “op_event”: “end”, “op_elapsed”: “4.502ms”}
run: open server: open tsdb store: mkdir /var/lib/influxdb/data/_internal/_series: permission denied
4.

$ 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.

*** No problem solved.

Now I start from beginning
1.
$sudo netstat -lptn
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name tcp 0 0 127.0.0.1:8088
0.0.0.0:* LISTEN 4679/influxd 2.

That shows that influxd is running, and listening on port 8088.

$sudo kill 4679

It is no longer running.

  1. $influxd

You start influxd but not as root, therefore it will not have the required
permissions to run.

run: open server: open tsdb store: mkdir
/var/lib/influxdb/data/_internal/_series: permission denied 4.

It does not have the required permissions to run. You cannot start influxd as
non-root.

$ 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.

You now have two problems:

  1. You are trying to start influxd as non-root. This will not work.

  2. When you do start influxd as root, it listens only on port 8088, and you
    then try to connect to it on port 8086, This will not work.

To fix this:

  1. Make sure you either have bind-address = “:8086” in the [http] section of
    /etc/influxdb/influxdb.conf or that this is commented out and there is no other
    bind-address statement in that section of the file.

  2. Start influxd as root, do not kill it, and do not try re-starting it as non-
    root.

  3. Connect using the command “influx” as non-root; it should connect to port

If that does not work, check the output of “netstat -lptn” again and check
whether influx is listening on both port 8086 and 8088.

Regards,

Antony.

Hi,

Thank lot.

  1. Now I tried $sudo influxd in root (It loading more file 1-2 minutes)

  2. After I start influx ... (not connected to port) 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.

  3. $sudo netstat -lptn (no listen port on influxdb)

**Config file is default
[http]
#bind-address = “.8086” (default, commented)

What can i do next…