Collectd and InfluxDB host and port confusion

Hi all.

I’ve set up Collectd and InfluxDB using the procedure outlined here:

I have two questions regarding port configurations.

In Collectd, in the Network plugin, I need to specify the path to the InfluxDB server, which in my case is localhost. I also need to mention a port, but when I specify 8086, which is the InfluxDB port, it doesn’t work. It only works if I specify 25826, which is the port of the Collectd service on the local host system. Shouldn’t I be specifying the remote host and port?

Another thing is, in the InfluxDB configuration, I can only get it to work if I specify the Collectd port. Which I don’t understand. Why do I need to specify the client port?

Thanks in advance.