Page 1 of 1

Getting 500 error on Web UI of Sabnzbd

Posted: May 14th, 2020, 7:21 pm
by engkazim2000
Hello,

We are using Sabnzbd form last few months its working perfectly fine but today its giving me 500 error on webUI can you please guide me how to fix that issue

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 15th, 2020, 3:32 am
by safihre
Well, what is the error? It should show you more than just 500.

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 25th, 2020, 12:45 pm
by slvrdragn
I restarted today to get a 500, this was after a patch and reboot.
pip3 install -r requirements.txt shows all satisfied.

NameMapper.NotFound: cannot find 'apikey'

Code: Select all

500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/usr/local/lib/python3.8/site-packages/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
  File "/usr/local/lib/python3.8/site-packages/cherrypy/lib/encoding.py", line 219, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/opt/sabnzbd/sabnzbd/interface.py", line 119, in internal_wrap
    return internal_wrap
  File "/opt/sabnzbd/sabnzbd/interface.py", line 399, in index
  File "_opt_sabnzbd_interfaces_Glitter_templates_main_tmpl.py", line 157, in respond
NameMapper.NotFound: cannot find 'apikey'
Powered by CherryPy 18.6.0

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 26th, 2020, 8:38 am
by safihre
You need to restart your SABnzbd, it has updated the template files but the SABnzbd itself isnt updated yet,

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 26th, 2020, 12:58 pm
by slvrdragn
Weird, it does work now, but the first thing i tried was a restart.
Thanks for fixing my stupid :)

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 27th, 2020, 1:26 am
by safihre
Great!
Let us know if you experience any bugs or weird behavior on the Python 3 version. It's still a testing-release!

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 27th, 2020, 2:39 am
by OneCD
If I can add a "me too!" ... ;D

I've been seeing the same thing while testing installation of the new SABnzbd package on QNAP NAS. Sometimes, I'll get a 500 error - which can be fixed by restarting SABnzbd. But sometimes it starts OK.

This only happens when starting SABnzbd for Python 3 for the first time.

Subsequent startups always seem to be OK.

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 27th, 2020, 7:36 am
by safihre
I just did some changes this week that can cause this. It depends on the cached template-files or the program not beeing restarted truely.

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 28th, 2020, 1:06 am
by OneCD
safihre wrote: May 27th, 2020, 7:36 am It depends on the cached template-files or the program not beeing restarted truely.
I'm not sure what to make of that. ???

Is there anything I can do to ensure SAB3 will start correctly first time?

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 28th, 2020, 1:52 am
by safihre
Not sure.. on Windows I never experience these problems, a simple restart of SABnzbd after applying changes is enough.
But you are sure this isn't always working for you?

Re: Getting 500 error on Web UI of Sabnzbd

Posted: May 28th, 2020, 3:45 am
by safihre
Maybe it's some caching that the Cheetah-template system does.. Not sure about that or if we can even control it :/

Maybe SABnzbd needs an external restart to get it to really clear its cache, not just the internal restart.

Re: Getting 500 error on Web UI of Sabnzbd

Posted: December 3rd, 2020, 3:38 pm
by jwhitt12
thank you all for the replies.

Today I turned on the machine and then ran sabnzbd+ again and things have changed. Still got an error but its waay different with a trace back:
ERROR a few seconds ago [03/Dec/2020:12:33:17] ENGINE Error in HTTPServer.tick

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cherrypy/wsgiserver/__init__.py", line 2021, in start self.tick()
File "/usr/lib/python3/dist-packages/cherrypy/wsgiserver/__init__.py", line 2090, in tick s, ssl_env = self.ssl_adapter.wrap(s)
File "/usr/lib/python3/dist-packages/cherrypy/wsgiserver/ssl_builtin.py", line 66, in wrap s = self.context.wrap_socket(sock,do_handshake_on_connect=True,
File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create(
File "/usr/lib/python3.8/ssl.py", line 1040, in _create self.do_handshake()
File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake()
OSError: [Errno 0] Error

INFO Glitter has some (new) features you might like! Glitter Tips and Tricks

I have absolutely no idea what I am looking at but it all seems connected to python3 & 3.8

Re: Getting 500 error on Web UI of Sabnzbd

Posted: December 4th, 2020, 3:06 pm
by safihre
This is a different problem:
viewtopic.php?f=2&t=24900
It is a bug in Python which is fixed in the latest Python 3.8 and 3.9