My Python setup might be borked.

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
el56
Newbie
Newbie
Posts: 6
Joined: November 6th, 2022, 9:39 pm

My Python setup might be borked.

Post by el56 »

Hi all.

Running Ubuntu Server 22.04 LTS

Things have been working fine until this week, A few days ago I tried installing something that required Pythin2 and it brought along some stuff that seems to have borked all my other Python apps including sabnzbdplus.

I've changed instances of ".py" to "{dot}py" because otherwise the Board thinks the raw messages are links which are not allowed for a new user.

Code: Select all

... looks fine up to this point
022-11-06 21:32:34,943::INFO::[sabnzbdplus:1470] Starting sabnzbdplus-3.5.1
2022-11-06 21:32:34,954::INFO::[dirscanner:117] Dirscanner starting up
2022-11-06 21:32:34,954::INFO::[notifier:123] Sending notification: SABnzbd - SABnzbd 3.5.1 started (type=startup, job_cat=None)
2022-11-06 21:32:34,956::INFO::[notifier:123] Sending notification: Error - [06/Nov/2022:21:32:34] ENGINE Error in HTTPServer.serve
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cheroot/server{dot}py", line 1810, in serve
    self._connections.run(self.expiration_interval)
  File "/usr/lib/python3/dist-packages/cheroot/connections{dot}py", line 201, in run
    self._run(expiration_interval)
  File "/usr/lib/python3/dist-packages/cheroot/connection{dot}py", line 218, in _run
    new_conn = self._from_server_socket(self.server.socket)
  File "/usr/lib/python3/dist-packages/cheroot/connections{dot}py", line 272, in _from_server_socket
    s, ssl_env = self.server.ssl_adapter.wrap(s)
  File "/usr/lib/python3/dist-packages/cheroot/ssl/builtin{dot}py", line 277, in wrap
    s = self.context.wrap_socket(
  File "/usr/lib/python3.10/ssl{dot}py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.10/ssl{dot}py", line 1071, in _create
    self.do_handshake()
  File "/usr/lib/python3.10/ssl{dot}py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:997)
 (type=error, job_cat=None)
2022-11-06 21:32:34,956::ERROR::[_cplogging:213] [06/Nov/2022:21:32:34] ENGINE Error in HTTPServer.serve
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cheroot/server{dot}py", line 1810, in serve
    self._connections.run(self.expiration_interval)
  File "/usr/lib/python3/dist-packages/cheroot/connections{dot}py", line 201, in run
    self._run(expiration_interval)
  File "/usr/lib/python3/dist-packages/cheroot/connections{dot}py", line 218, in _run
    new_conn = self._from_server_socket(self.server.socket)
  File "/usr/lib/python3/dist-packages/cheroot/connections{dot}py", line 272, in _from_server_socket
    s, ssl_env = self.server.ssl_adapter.wrap(s)
  File "/usr/lib/python3/dist-packages/cheroot/ssl/builtin{dot}py", line 277, in wrap
    s = self.context.wrap_socket(
  File "/usr/lib/python3.10/ssl{dot}py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.10/ssl{dot}py", line 1071, in _create
    self.do_handshake()
  File "/usr/lib/python3.10/ssl{dot}py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:997)

2022-11-06 21:32:34,957::INFO::[ssdp:108] Serving SSDP on 192.168.2.200 as SABnzbd
Many thanks for any help.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: My Python setup might be borked.

Post by safihre »

This seems to be an old version of cheroot maybe.
This error otherwise would have been silently ignored.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
el56
Newbie
Newbie
Posts: 6
Joined: November 6th, 2022, 9:39 pm

Re: My Python setup might be borked.

Post by el56 »

safihre wrote: November 7th, 2022, 12:21 am This seems to be an old version of cheroot maybe.
This error otherwise would have been silently ignored.
What is installed is current to Ubuntu server, in a package called "python3-cheroot" at version 8.5.2

I reinstalled i but that didn't help.

Is it possible that I am missing some necessary modules? I wonder if some of my problem may have been pip getting in the way of modules provided by the Linux maintainers.
Last edited by el56 on November 7th, 2022, 3:59 am, edited 1 time in total.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: My Python setup might be borked.

Post by sander »

You could try this:

Stop sabnzbd. Re-check it's not running.
Then start SABnzbd with a fresh config, so no HTTPS:

Code: Select all

sabnzbdplus -f blabla.ini -l2 -b1 -s 0.0.0.0
Does SAB start up without errors?
If so: access its webinterface, fill out the wizard, and test that you can access a newsserver.
If not ... borked indeed. I would choose to do a fresh install of Ubuntu. Or, maybe, run SABnzbd in docker ... if you know how to handle docker.
el56
Newbie
Newbie
Posts: 6
Joined: November 6th, 2022, 9:39 pm

Re: My Python setup might be borked.

Post by el56 »

sander wrote: November 7th, 2022, 3:48 am You could try this:

Stop sabnzbd. Re-check it's not running.
Then start SABnzbd with a fresh config, so no HTTPS:

Code: Select all

sabnzbdplus -f blabla.ini -l2 -b1 -s 0.0.0.0
Does SAB start up without errors?
If so: access its webinterface, fill out the wizard, and test that you can access a newsserver.
If not ... borked indeed. I would choose to do a fresh install of Ubuntu. Or, maybe, run SABnzbd in docker ... if you know how to handle docker.
I'm on a headless server, so until I can connect from another system on the network I may be stuck with lynx for my browser.

It starts, but... lynx is giving me all sorts of certificate errors

SSL error:The certificate is NOT trusted. The certificate issuer is unknown. -Continue? (n)
SSL error:Can't find common name in certificate-Continue? (n)
SSL error:The certificate is NOT trusted. The certificate issuer is unknown. -Continue? (n)
SSL error:Can't find common name in certificate-Continue? (n)
Can't find common name in certificate

If I power through by answering 'Y' to all the continue challenges, I eventually get to the page but it's looking difficult to get through.
When I exit lynx I get this:

lynx: Can't access startfile https://127.0.0.1:8080/sabnzbd
2022-11-07 04:10:36,539::INFO::[notifier:123] Sending notification: SABnzbd - SABnzbd 3.5.1 started (type=startup, job_cat=None)
2022-11-07 04:10:36,540::DEBUG::[misc:420] Version check disabled by Debian/Ubuntu packaging
2022-11-07 04:10:36,540::DEBUG::[sabnzbdplus:1505] Using 192.168.2.200 as host address for Bonjour and SSDP
2022-11-07 04:10:36,541::DEBUG::[zconfig:80] Try to publish in Bonjour as "servername" (192.168.2.200:8080)
2022-11-07 04:10:36,546::DEBUG::[zconfig:101] Successfully started Bonjour service
2022-11-07 04:10:36,546::INFO::[ssdp:108] Serving SSDP on 192.168.2.200 as SABnzbd

Does this help?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: My Python setup might be borked.

Post by sander »

I'm on a headless server, so until I can connect from another system on the network I may be stuck with lynx for my browser.
Yes, you can, therefore I gave you the "-s 0.0.0.0" parameter
Does this help?
If you really followed my instruction, and that is the result, my conclusion is: borked. So see my advice in my previous post.
el56
Newbie
Newbie
Posts: 6
Joined: November 6th, 2022, 9:39 pm

Re: My Python setup might be borked.

Post by el56 »

sander wrote: November 7th, 2022, 3:48 am You could try this:

Stop sabnzbd. Re-check it's not running.
Then start SABnzbd with a fresh config, so no HTTPS:

Code: Select all

sabnzbdplus -f blabla.ini -l2 -b1 -s 0.0.0.0
Does SAB start up without errors?
If so: access its webinterface, fill out the wizard, and test that you can access a newsserver.
The last try came with my using my original ini file. When I start with an empty one, I have a wizard.

I'll update in a few hours how that went, I need some sleep...

Thanks so much for your help.
el56
Newbie
Newbie
Posts: 6
Joined: November 6th, 2022, 9:39 pm

Re: My Python setup might be borked.

Post by el56 »

Update:

Right now it appears that the problem was caused by a clash between modules from pip and those provided by the Linux distribution.

I've been reinstalling many of the Linux packages such as python3-attr, python3-babelfish, python3-automat, etc.

Each reinstall is resulting in fewer errors and now the running status looks OK.
I'm not completely fixed but the progress has been good.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: My Python setup might be borked.

Post by safihre »

Nice ;)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
el56
Newbie
Newbie
Posts: 6
Joined: November 6th, 2022, 9:39 pm

Re: My Python setup might be borked.

Post by el56 »

sander wrote: November 7th, 2022, 3:48 am You could try this:

Stop sabnzbd. Re-check it's not running.
Then start SABnzbd with a fresh config, so no HTTPS:

Code: Select all

sabnzbdplus -f blabla.ini -l2 -b1 -s 0.0.0.0
Update:
I've now recovered most settings and servers and things are working OK except for one thing.
If I enable HTTPS in the General tab the webserver crashes immediately. So long as it's off it seems to be working OK.

Any suggestions?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: My Python setup might be borked.

Post by sander »

Fresh install of Ubuntu. Or run sabnzbd from docker.
Post Reply