You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the SSL handshake fails with an OSError, the producer thread keeps retrying to connect with the same connection resulting in the same error occurring again. The workaround is to restart the stuck producers.
This is with version 2.0.1, though it seems the relevant code has not changed since.
ERROR:kafka.producer.sender:Uncaught error in kafka producer I/O thread
OSError: [Errno 0] Error
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 648, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 1036, in do_handshake
self._sock.do_handshake()
File "/usr/local/lib/python3.6/site-packages/kafka/conn.py", line 505, in _try_handshake
if self._try_handshake():
File "/usr/local/lib/python3.6/site-packages/kafka/conn.py", line 426, in connect
conn.connect()
File "/usr/local/lib/python3.6/site-packages/kafka/client_async.py", line 390, in _maybe_connect
self._maybe_connect(node_id)
File "/usr/local/lib/python3.6/site-packages/kafka/client_async.py", line 580, in poll
self._client.poll(timeout_ms=poll_timeout_ms)
File "/usr/local/lib/python3.6/site-packages/kafka/producer/sender.py", line 160, in run_once
self.run_once()
File "/usr/local/lib/python3.6/site-packages/kafka/producer/sender.py", line 60, in run
Perhaps OSError should close the connection here to prevent error looping:
Newer versions of Python might have been fixed not to produce OSError in this case: https://bugs.python.org/issue31122
Though it seems to me it would be best if kafka-python guarded against this situation.
The text was updated successfully, but these errors were encountered:
When the SSL handshake fails with an
OSError
, the producer thread keeps retrying to connect with the same connection resulting in the same error occurring again. The workaround is to restart the stuck producers.This is with version 2.0.1, though it seems the relevant code has not changed since.
Perhaps
OSError
should close the connection here to prevent error looping:kafka-python/kafka/conn.py
Line 513 in 7ac6c6e
Newer versions of Python might have been fixed not to produce
OSError
in this case: https://bugs.python.org/issue31122Though it seems to me it would be best if
kafka-python
guarded against this situation.The text was updated successfully, but these errors were encountered: