InfluxDB configuration issue (?) with UDP vs HTTP

I have an INfluxDB 1.8 running on a Debian Stretch server. I run a Python program against this server (from a Windows10 machine) and read/write data from/to Influx.
For HTTP everything is fine, but as soon as I use UDP, I get “[WinError 10061] connection refused” errors.

I checked that the UDP service is running (what it does) by running netstat -lup yielding the following (output limited to Influxd)

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name     
udp   ....
...
udp6       0      0 [::]:8089               [::]:*                              2263/influxd 
...

If I do the same for HTTP (netstat -ltp) I see the following:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 localhost:omniorb       0.0.0.0:*               LISTEN      2263/influxd        
tcp6       0      0 [::]:8086               [::]:*                  LISTEN      2263/influxd        

In our organization the IP6 support is partly de-activated, so I guess this could be the reason why the UDP connection from my Windows PC does not work.

How can I configure UDP such that it listens as well to IP4:port?

Hello @wgeithner,
I’m not sure, but which client are you using?

Please use this client, it’s the only one that is supported. https://github.com/influxdata/influxdb-client-python

Please look at InfluxDB 1.8 compatibility:

GitHub

influxdata/influxdb-client-python

Here’s an example of 1.8 compatibility. If you’re using InfluxDB Cloud for example, your client instantiation would look like this for 1.8:
username = ‘username’
password = ‘password’

database = ‘mydatabase’
retention_policy = ‘autogen’

bucket = f’{database}/{retention_policy}’
client = InfluxDBClient(url=“localhost:8086”, token=f’{username}:{password}’, org=’-’)

Hi AnaisDG,

My initial issue appeared using the older “influxdb” Python package version 5.3.0. Triggered by your question I updated to “influxdb-client”. However, I ran into other problems with the new Python API. Maybe you have a clue? Cannot wrap my head around JWT authentication/authorization

OK, found that the line token=f’{username}{password}’ did the trick concerning the authorization issue. However, the UDP problem is still there, as well with the new Python API

@wgeithner - Are you setting the use_udp in the python InfluxDB client? The InfluxDB server also needs to be specifically configured to listen on specific UDP ports. These docs are for 1.8: https://docs.influxdata.com/influxdb/v1.8/supported_protocols/udp/

Hi phijb, thanks for the Suggestion, but I configured the Server and influxdb.conf according to the Documentation you linked.

1 Like