Access problem to influxDB from node Red - different Server

hello

nodered, influxdb1.8.x and grafana are on 3 different VM.
After i had to reboot the Node itself the vm rebootet without error but

nodered can't write down to influxdb
grafana can't read data from influxdb

grafana say InfluxDB Error: Bad Gateway
nodered say "Error: connect ECONNREFUSED 10.147.42.155:8086"

*.155 is the influxdb server

doing a nmap again the influx server the Port 8086 is not there.

but on influxdb

ss -tulpn

Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 128 127.0.0.1:8086 0.0.0.0:* users:(("influxd",pid=340,fd=125))

so i am confuse - and can't find how to solve it

thanks for any information

have a nice day
vinc

any idea why after a reboot and update the port is not anymore there?

Did you - by any chance - upgrade to Influx 1.8.9? They have changed the way it starts, which broke several setups on slower systems or with many shards.

If that's the cause, there are some workarounds.

It has also be discussed on the forum: Influxdb upgrade from v1.8.6 broken [FIX] v1.8.9 still broken

and on Github: https://github.com/influxdata/influxdb/issues/21967

hell, yes

influx

Connected to http://localhost:8086 version 1.8.9
InfluxDB shell version: 1.8.9

but local i can start it, it is just from the other VM, nodeRed server VM, the ip and port are not there, ping is ok too

Is influx definitely running ok? In the influx VM can you access the server via that port?

You said ping is ok. Do you mean that from the node red server you are able to ping the ip of the influx VM? Do the VMs have separate IPs or have you bridged the networking?

Hello @Colin
they are separatet IP Address!

dbflux18:~# has the IP 10.147.42.155

dbflux18:~# influx
Connected to http://localhost:8086 version 1.8.9
InfluxDB shell version: 1.8.9

dbflux18:~# ss -tulpen
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 128 127.0.0.1:8086 0.0.0.0:* users:(("influxd",pid=715,fd=125)) uid:998 ino:15480 sk:1 <->
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=636,fd=3)) ino:14587 sk:2 <->
tcp LISTEN 0 128 127.0.0.1:8088 0.0.0.0:* users:(("influxd",pid=715,fd=3)) uid:998 ino:15470 sk:3 <->
tcp LISTEN 0 128 :4949 : users:(("munin-node",pid=373,fd=5)) ino:14127 sk:4 v6only:0 <->
tcp LISTEN 0 128 [::]:22 [::]:
users:(("sshd",pid=636,fd=4)) ino:14598 sk:5 v6only:1 <->

===============
NodeRed2:~# 10.147.42.151/24

NodeRed2:~# nmap 10.147.42.155
Starting Nmap 7.70 ( https://nmap.org ) at 2021-09-14 09:36 CEST
Nmap scan report for 10.147.42.155
Host is up (0.000072s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
22/tcp open ssh

dbflux18:~# 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 Mon 2021-09-13 23:34:07 CEST; 10h ago
Docs: InfluxDB OSS 2.0 Documentation
Process: 714 ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh (code=exited, status=0/SUCCESS)
Main PID: 715 (influxd)
Tasks: 9 (limit: 2356)
Memory: 283.3M
CGroup: /system.slice/influxdb.service
mq715 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Sep 14 09:30:00 iot30-vm820-dbflux18 influxd-systemd-start.sh[714]: ts=2021-09-14T07:30:00.070663Z lvl=info msg="Finished continuous query" log_id=
Sep 14 09:30:00 iot30-vm820-dbflux18 influxd-systemd-start.sh[714]: ts=2021-09-14T07:30:00.070774Z lvl=info msg="Continuous query execution (end)"

nmap does not default to all ports. Try
nmap 10.147.42.155 -p-

@Colin merci
just to use -p- take to long.

NodeRed2:~# nmap -p 1-10000 10.147.42.155
Starting Nmap 7.70 ( https://nmap.org ) at 2021-09-14 10:23 CEST
Nmap scan report for 10.147.42.155
Host is up (0.00025s latency).
Not shown: 9998 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
4949/tcp open  munin

i think there is something wrong on the influxdb side

Are you absolutely sure that the IP of the VM is what you think. I have on more than one occasion spent ages trying to analyse problems like this only to realise that I was talking to the wrong machine.

as node red give this error - would say yes

14.9.2021, 10:40:39node: DB433Mhz_2 Balkon
msg : error
"Error: connect ECONNREFUSED 10.147.42.155:8086"

and on the other side

dbflux18:~# ss -tulpen
Netid   State    Recv-Q   Send-Q     Local Address:Port     Peer Address:Port
tcp     LISTEN   0        128            127.0.0.1:8086          0.0.0.0:*       users:(("influxd",pid=715,fd=125)) uid:998 ino:15480 sk:1 <->
tcp     LISTEN   0        128              0.0.0.0:22            0.0.0.0:*       users:(("sshd",pid=636,fd=3)) ino:14587 sk:2 <->
tcp     LISTEN   0        128            127.0.0.1:8088          0.0.0.0:*       users:(("influxd",pid=715,fd=3)) uid:998 ino:15470 sk:3 <->
tcp     LISTEN   0        128                    *:4949                *:*       users:(("munin-node",pid=373,fd=5)) ino:14127 sk:4 v6only:0 <->
tcp     LISTEN   0        128                 [::]:22               [::]:*       users:(("sshd",pid=636,fd=4)) ino:14598 sk:5 v6only:1 <->

could it be i should change to the real address

# vi /etc/influxdb/influxdb.conf

line 260 bind-address = "127.0.0.1:8086"```

Why does that make you thing that the ip address of the influx vm is 10.147.42.155? In fact it makes me think it may be the wrong address. There is obviously a machine at that address but which one is it? That is the question.

In the influx machine what does ifconfig show, or if that is not installed ip addr.

Did you edit that? Normally you should leave it commented out (unless the default has now changed). Then it should default to any address, port 8086. Then in ss it shows as *:8086

i think it is corrct because befor the node reboot and the VM update it did work like this
it looks like the port is not open from a other vm

Thinking is not enough. Check it with ifconfig or ip addr.

@Colin this is done access with port 22 works fine

dbflux18:~# ip a
inet 10.147.42.155/24

also is the vm with influxdb sending update to munin.

the problem is i think just this port 8086

You didn't answer my question about whether you edited the bind_address line? If you didn't then what do the comments before it say?

If it is bound to 127.0.0.1:8086 then it should not respond on the 10 address

sorry @Colin i am not sure if i did!

@dceejay if it is not respondig - it will not connect - so i would have to change it

a default minimum debian10 installation what Firewall is installed or active by default?

have a nice day
vinc

Looking at the docs you should set that to
bind-address = ":8086"