How can i config a influxdb 2.0 in the NAT? I got error like bellow:

Hi, anyone know about it ? how to fixed it ? thanks very much.
/var/log/messages

local ip address is : 192.21.13.80
and the VPN client access address is : 172.21.13.80 (http://172.21.13.80:8086)

Aug 5 20:34:11 slb influxd: ts=2021-08-05T12:34:11.341313Z lvl=error msg=“Unable to gather” log_id=0VdYvERG000 error=“Get "hxxp://172.21.13.80:8086/metrics": dial tcp 172.21.13.80:8086: connect: no route to host”
Aug 5 20:34:14 slb influxd: ts=2021-08-05T12:34:14.019625Z lvl=info msg=“Cache snapshot (start)” log_id=0VdYvERG000 service=storage-engine engine=tsm1 op_name=tsm1_cache_snapshot op_event=start
Aug 5 20:34:14 slb influxd: ts=2021-08-05T12:34:14.208616Z lvl=info msg=“Snapshot for path written” log_id=0VdYvERG000 service=storage-engine engine=tsm1 op_name=tsm1_cache_snapshot path=/gnss/data/influxdb/engine/data/10941c2d9fee0437/autogen/10 duration=189.014ms
Aug 5 20:34:14 slb influxd: ts=2021-08-05T12:34:14.208667Z lvl=info msg=“Cache snapshot (end)” log_id=0VdYvERG000 service=storage-engine engine=tsm1 op_name=tsm1_cache_snapshot op_event=end op_elapsed=189.066ms
Aug 5 20:34:21 slb influxd: ts=2021-08-05T12:34:21.336237Z lvl=error msg=“Unable to gather” log_id=0VdYvERG000 error=“Get "hxxp://172.21.13.80:8086/metrics": dial tcp 172.21.13.80:8086: connect: no route to host”
Aug 5 20:34:25 slb influxd: ts=2021-08-05T12:34:25.019693Z lvl=info msg=“Cache snapshot (start)” log_id=0VdYvERG000 service=storage-engine engine=tsm1 op_name=tsm1_cache_snapshot op_event=start
Aug 5 20:34:25 slb influxd: ts=2021-08-05T12:34:25.175027Z lvl=info msg=“Snapshot for path written” log_id=0VdYvERG000 service=storage-engine engine=tsm1 op_name=tsm1_cache_snapshot path=/gnss/data/influxdb/engine/data/10941c2d9fee0437/autogen/10 duration=155.373ms
Aug 5 20:34:25 slb influxd: ts=2021-08-05T12:34:25.175094Z lvl=info msg=“Cache snapshot (end)” log_id=0VdYvERG000 service=storage-engine engine=tsm1 op_name=tsm1_cache_snapshot op_event=end op_elapsed=155.437ms
Aug 5 20:34:31 slb influxd: ts=2021-08-05T12:34:31.336375Z lvl=error msg=“Unable to gather” log_id=0VdYvERG000 error=“Get "hxxp://172.21.13.80:8086/metrics": dial tcp 172.21.13.80:8086: connect: no route to host”
Aug 5 20:34:36 slb influxd: ts=2021-08-05T12:34:36.020442Z lvl=info msg=“Cache snapshot (start)” log_id=0VdYvERG000 service=storage-engine engine=tsm1 op_name=tsm1_cache_snapshot op_event=start

local ip address is : 192.21.13.80
and the VPN client access address is : 172.21.13.80

Does this mean you have a VPN client on your computer, and it has assigned you
the address 172,21,13,80?

What’s at the other end of the VPN?

http://172.21.13.80:8086

Can you access that in a browser?

dial tcp 172.21.13.80:8086: connect: no route to host

So, this is a networking problem, not an Influx problem.

Please explain your network setup to us, for example:

  • what is the IP address of the machine you are trying to connect to Influx
    from?

  • what is the IP address of the machine which is running Influx?

  • if these two addresses are not in the same subnet, how are they connected
    to each other?

  • can you ping the influx machine’s address from your own computer?

Antony.

Thank you!
The influxdb runing on the server ip address is 192.21.13.80, and my computer can’t access it directly, i must login the VPN client first and access the http://172.21.13.80:8086

Even if I close the browser, it is still print the error to the /var/log/message every 10 seconds.

Which is it? 192 or 172?

What IP address does your computer get assigned when you are connected to the
VPN, and can you then ping 172.21.13.80 (assuming that’s the correct address)?

Antony.

172 is the outside ip address.

After i connected to the VPN, i can ping it .

Good.

So, what happens if you:

a) stop influx on your local machine, and check /var/log/messages to ensure it
really is stopped

b) start (or re-start) the VPN link

c) start influx on your machine

d) check /var/log/messages to see whether it can now connect to 172.21.13.80

Antony.

Sorry, I did not say it clearly.

bellow is the server network configure:
CleanShot 2021-08-10 at 13.59.46

172.21.13.80 maybe the virtual ip of server, it can’t access in the server, only can access from my computer which has been login the VPN client.