Some network troubleshooting is needed before digging into the app. If you have access to you influx server do some basic checks. (assuming linux)
Make sure your daemon is up and running on the ports you expect
You should see some line simialr to
tcp6 0 0 :::8086 :::* LISTEN 6501/influxd
The ss command will provide something similar but more verbose.
If you see that your server should accept connections. Jump over to the client and run
telnet <influx_server> 8086
you should see something like
Connected to <influx_server>.
Escape character is ‘^]’.
You can Ctl ] to escape the socket connection or enter “GET /*” (less the “”) and you will get a HTTP error msg.
What this proves is you can connect to the influxdb web interface. And you can start looking at influx config issues.
If you don’t get a connection or it times out. The port is blocked. As mentioned earlier look for a firewall.
If you are sure it’s not firewall it could be SELINUX getting in the way. Edit the /etc/selinux/config file (or your distro’s equivalent) and disable SELINUX .
Reboot and try to connect again. If that is still not working for you. Then you will need to see if the packets are even getting to the port (tcpdump). Chances are firewall or selinux will do the trick for you.