New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyLink is disconnecting from servers with various socket errors, primarily SSL-related #463

Open
Techman opened this Issue May 19, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@Techman

Techman commented May 19, 2017

I've been encountering this for a while on my box. It's running Ubuntu 16.04 LTS, x64. Throughout my time using the software, I've come across various kinds of socket errors.

  • [ERROR] (nc) Disconnected from IRC: SSLEOFError: EOF occurred in violation of protocol (_ssl.c:645)
  • [ERROR] (ttx) Disconnected from IRC: BlockingIOError: [Errno 11] Resource temporarily unavailable
  • [ERROR] (ttx) Disconnected from IRC: ConnectionResetError: [Errno 104] Connection reset by peer
  • [ERROR] (nc) No data received, disconnecting!

What InspIRCd sees:

  • <clank.techtronix.net> LINK: Server relay.techtronix.net split: The TLS connection was non-properly terminated.

Edit by @GLolol: removed quote

@Techman

This comment has been minimized.

Techman commented May 19, 2017

@jlu5

This comment has been minimized.

Owner

jlu5 commented May 21, 2017

This seems to be specifically related to OpenSSL 1.0.2, which Python's ssl module uses as a backend. This has hit numerous other projects as well:

websocket-client/websocket-client#149
tornadoweb/tornado#438
excon/excon#467

Unfortunately I don't see a fix other than to switch to some other OpenSSL version; for Ubuntu I haven't found any official alternative versions.

@jlu5 jlu5 added this to the v1.2 milestone May 22, 2017

@jlu5 jlu5 removed this from the v1.2 milestone Jun 30, 2017

jlu5 added a commit that referenced this issue Jul 30, 2017

jlu5 added a commit that referenced this issue Jul 30, 2017

jlu5 added a commit that referenced this issue Mar 30, 2018

Irc: don't abort on BlockingIOError, ssl.SSLWantReadError, ssl.SSLWan…
…tWriteError

This effectively merges in the following 2.0 commits:
- "IRCNetwork: do not break on socket BlockingIOError" 6a90e99
- "IRCNetwork: also catch ssl.SSLWantReadError and ssl.SSLWantWriteError" ccc9f8e
- "IRCNetwork: bump SOCKET_REPOLL_WAIT to 1 sec" 9246071

This fixes one part of #463.
@jlu5

This comment has been minimized.

Owner

jlu5 commented Apr 17, 2018

@jlu5

This comment has been minimized.

Owner

jlu5 commented Sep 23, 2018

I've also seen reports of "[SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636" errors, as seen at https://bugs.python.org/issue22499. This seems to be a slightly different problem that could be worked around by callers into the ssl module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment