influxdb-python
influxdb-python copied to clipboard
intermediate '[Errno 1] Operation not permitted'
influxdb/client.py in send_packet at line 772
self.udp_socket.sendto(data, (self._host, self.udp_port))
Seeing this exception poping up every few hundreds of call. Using version 3.0.0 of the lib on a CentOS machine, any ideas or directions?
Can you upgrade to the latest release and see if the problem persists?
On Dec 14, 2017 5:01 AM, "Avner Cohen" [email protected] wrote:
influxdb/client.py in send_packet at line 772
self.udp_socket.sendto(data, (self._host, self.udp_port))
Seeing this exception poping up every few hundreds of call. Using version 3.0.0 of the lib on a CentOS machine, any ideas or directions?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/influxdata/influxdb-python/issues/546, or mute the thread https://github.com/notifications/unsubscribe-auth/AGYxLWDgpLKMECXOqN1_orqlWnNY8vncks5tAPHegaJpZM4RBz6r .
Got the exact same error after upgrading to 5.0.0. This is not constant, and probably 99% of requests go just fine. Happy to provide additional data as needed.
Is it possible two processes are racing and one is holding the port open causing this error? How are you calling the write
?
Thanks for trying to help on this, much appreciated.
We are using a very basic setup of:
influx_client = InfluxDBClient(server_name, http_port, username, password, database, use_udp=True, udp_port=udp_port)
self.influx_client.write_points([...])
To send data, via udp.
We are running python 2.7.13 and the write() is invoked from a server with multiple celery workers, I imagine there is a potential for multiple requests on the same time.. Is there an easy way to test this direction?
This happens to us too.
We are using influxdb==5.2.1
, Python 3.6, using UDP socket_listener
in Telegraf.
Every hour we consistently getting 4~8 such errors, our app is making ~ 300 stats reporting requests each hour.
This likely happened b.c. this lib do not catch socket related errors during sending stats, like other libs do, example: https://github.com/jsocol/pystatsd/blob/master/statsd/client/udp.py#L45
May be it's a good think, but it's not obvious for the clients of the library that it may throw an exception, even though it's UDP.
Thanks @s-petrunin, would you prefer that we add a try/catch
to https://github.com/influxdata/influxdb-python/blob/cdc2c665808f2cf572973029f81b9a0175b43277/influxdb/client.py#L1168