OSX Monterey - Sabnzbd stops listening: OSError: [Errno 57] Socket is not connected

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
jc123
Newbie
Newbie
Posts: 4
Joined: July 9th, 2022, 4:12 pm

OSX Monterey - Sabnzbd stops listening: OSError: [Errno 57] Socket is not connected

Post by jc123 »

Strange stuff. I would lose the web interface from time to time (not sure what is triggering it.

I was having issues with the latest release so I'm now running the develop branch on the command line and I'm getting the following error:

Any suggestions on how to troubleshoot.? I'm on the latest OS release and python3 version 3.9.13

I'm only using HTTP and this is happing on the localhost.


2022-07-09 23:39:43,383::WARNING::[_cplogging:213] [09/Jul/2022:23:39:43] ENGINE socket.error 57

I would put the trace in but the submit thinks that there is a link in there and denying me.

The last function was parse_request().

Again, it's random and on localhost
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: OSX Monterey - Sabnzbd stops listening

Post by jcfp »

Put the log / traceback on a pastebin and post the link (add some spaces so that the anti-spam feature doesn't kick in).
jc123
Newbie
Newbie
Posts: 4
Joined: July 9th, 2022, 4:12 pm

Re: OSX Monterey - Sabnzbd stops listening - NEW CLUE

Post by jc123 »

Interesting clue - I changed the config to use 127.0.0.1 and didn't crash the web interface but using 192.168.4.16 (my internal address it crashes the listener with the first error being at: return self._sock.recv_into(b)

What's interesting is that Mylar is also dropping the listener from time to time. I'm changing that to use 127.0.0.1 and see if it fixes it.

Thx for any suggestions.
jc123
Newbie
Newbie
Posts: 4
Joined: July 9th, 2022, 4:12 pm

Re: OSX Monterey - Sabnzbd stops listening

Post by jc123 »

Update - I had the SABNzbd Host value == my IP address and at some point the listener would stop. I changed to 0.0.0.0 and it worked for awhile but then still stopped listening,

However setting the Host to 127.0.0.1 lets the app run for days without a crash.

Very strange - version: develop
os: OSX Monterey

debug: (replace spaces with slashes except between bin and .com )

pastebin .com embed_js VXrD6ed7
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

Re: OSX Monterey - Sabnzbd stops listening: OSError: [Errno 57] Socket is not connected

Post by sander »

Do you run SABnzbd from source (and not from the DMG image)?

Reason: it looks like you're using your own python instead of the python provided in the SABnzbd DMG package. Oh, it also looks you're using your own cherrypy, not the one provided by the SABnzbd DMG. Disclaimer: I'm not a Mac user, and I had only a look at the contents of the DMG pacakge from Linux.

Code: Select all

File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)

For (google) reference: https://pastebin.com/VXrD6ed7

Code: Select all

2022-07-12 11:39:42,575::WARNING::[_cplogging:213] [12/Jul/2022:11:39:42] ENGINE socket.error 57
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cheroot/server.py", line 1290, in communicate
req.parse_request()
File "/usr/local/lib/python3.9/site-packages/cheroot/server.py", line 719, in parse_request
success = self.read_request_line()
File "/usr/local/lib/python3.9/site-packages/cheroot/server.py", line 760, in read_request_line
request_line = self.rfile.readline()
File "/usr/local/lib/python3.9/site-packages/cheroot/server.py", line 310, in readline
data = self.rfile.readline(256)
File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_pyio.py", line 558, in readline
b = self.read(nreadahead())
File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_pyio.py", line 537, in nreadahead
readahead = self.peek(1)
File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_pyio.py", line 1133, in peek
return self._peek_unlocked(size)
File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_pyio.py", line 1140, in _peek_unlocked
current = self.raw.read(to_read)
File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
OSError: [Errno 57] Socket is not connected
Googling "OSError: [Errno 57] Socket is not connected" leads to IOS and MacOS hits (and a bit lesser FreeBSD), and "race condition". But ... very old bugs, not something recent, so not helpful for this case.

https://github.com/python/cpython/issue ... 1093445458
https://github.com/kmonsoor/py-amqplib/issues/45

FreeBSD error 57:
https://www.freebsd.org/cgi/man.cgi?que ... ease-ports

57 ENOTCONN Socket is not connected. An request to send or receive data
was disallowed because the socket was not connected and (when
sending on a datagram socket) no address was supplied.
jc123
Newbie
Newbie
Posts: 4
Joined: July 9th, 2022, 4:12 pm

Re: OSX Monterey - Sabnzbd stops listening: OSError: [Errno 57] Socket is not connected

Post by jc123 »

Thanks for the quick reply. I'll go see what the differences are between what's in the app and what I have (since I built the deployment from the github develop branch.
User avatar
sander
Release Testers
Release Testers
Posts: 8832
Joined: January 22nd, 2008, 2:22 pm

Re: OSX Monterey - Sabnzbd stops listening: OSError: [Errno 57] Socket is not connected

Post by sander »

jc123 wrote: July 14th, 2022, 3:23 pm Thanks for the quick reply. I'll go see what the differences are between what's in the app and what I have (since I built the deployment from the github develop branch.
Ah, as I guessed.

Please try the DMG image.
And if you want bleeding edge, github also provides DMG development versions. But that is for later.

EDIT:
1. You're using MacOS, so I assume you have no firewall and no virusscanner?
2. what can access your SABnzbd? Devices from your LAN? Or also Internet? Are you using any nasty network clients / scanners / etc? Cherrypy (in which the error occurs) can bail out with nasty traffic scanners
3. are you using HTTPS on SAB's webinterface? If so, can you turn that off temporarily?
Post Reply