sabnzbd / sabnzbd

SABnzbd - The automated Usenet download tool
http://sabnzbd.org
Other
2.31k stars 339 forks source link

"Connection failed!" error when opening Status and interface options #2245

Closed CampinCarl closed 2 years ago

CampinCarl commented 2 years ago

I'm getting the following error when I click the Status and interface options wrench. This looks similar to #2218 but the rest of the app appears to function normally. I'm running sabnzbd behind Traefik in a Docker Swarm. Any suggestions on how I might troubleshoot this?

2022-07-21 15_36_45-Paused - 4 1 GB left - SABnzbd — Mozilla Firefox

Here's the relevant traceback.

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/usr/lib/python3.9/site-packages/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
  File "/usr/lib/python3.9/site-packages/cherrypy/lib/encoding.py", line 223, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/app/sabnzbd/sabnzbd/interface.py", line 180, in internal_wrap
    return wrap_func(*args, **kwargs)
  File "/app/sabnzbd/sabnzbd/interface.py", line 472, in api
    return api_handler(kwargs)
  File "/app/sabnzbd/sabnzbd/api.py", line 104, in api_handler
    response = _api_table.get(mode, (_api_undefined, 2))[0](name, kwargs)
  File "/app/sabnzbd/sabnzbd/api.py", line 414, in _api_status
    return _api_status_table.get(name, (_api_fullstatus, 2))[0](value, kwargs)
  File "/app/sabnzbd/sabnzbd/api.py", line 405, in _api_fullstatus
    status = build_status(
  File "/app/sabnzbd/sabnzbd/api.py", line 1256, in build_status
    info["publicipv4"] = publicipv4()
  File "/app/sabnzbd/sabnzbd/getipaddress.py", line 114, in publicipv4
    result = addresslookup4(sabnzbd.cfg.selftest_host())
  File "/app/sabnzbd/sabnzbd/getipaddress.py", line 48, in func_wrapper
    return sabnzbd.THREAD_POOL.submit(item, *args, **kwargs).result(max_timeout)
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 447, in result
    raise TimeoutError()
concurrent.futures._base.TimeoutError
sanderjo commented 2 years ago

What kind of DNS? pihole, nextdns, ... ?

CampinCarl commented 2 years ago

Cloudflare and Google DNS at the router level, but Docker Swarm brings its own DNS at the overlay network level for internal service resolution.

thezoggy commented 2 years ago

what version of sab? 3.6.0? 3.7-dev?

CampinCarl commented 2 years ago

Config reports 3.6.0 [b31fedd]. I'm using linuxserver/sabnzbd - Docker Image | Docker Hub.

sanderjo commented 2 years ago

I think it's https://github.com/sabnzbd/sabnzbd/issues/2200#issuecomment-1151015556 Which is solved since sabnzbd github version of 19 june 2022

CampinCarl commented 2 years ago

Looks like you're right, thanks @sanderjo!

Something with Docker's overlay network DNS interferes with the status function(s), at least in v3.6.0. Adding a DNS server to the stack is a suitable workaround until the next version is available.

sanderjo commented 2 years ago

@CampinCarl

linuxserver sabnzbd has a tag "unstable": "Pre-releases from their GitHub", meaning it has that workaround for strange DNS behaviour.

Can you try that, with your standard network setup, and report back? I think you will get no Error, but neither an IPv4 address shown in the Wrench Status ...

It still puzzles me why this happens. It's not a malformed DNS answer, because with basic python code it works, and others reported the problem did not occur with a fresh basic setup of SABnzbd.

EDIT: can you also verify that: fresh sabnzbd.ini, in your standard docker setup ... do you get a public IPv4 address in Wrench Status?

CampinCarl commented 2 years ago

Certainly, I spun up a stack using linuxserver/sabnzbd:unstable, but I'm getting the exact same error. I'm using a default INI file, except for host_whitelist because of the Traefik reverse proxy. Both containers show the same version number in the configuration screen, i.e., 3.6.0 [b31fedd].

I suspect linuxserver's unstable tag doesn't pull the latest commit from this repository, but instead pulls the latest pre-release tag? I'm basing this on the linuxserver readme, which says (emphasis mine):

Tag Description
latest Stable SABnzbd releases
unstable Pre-releases from their GitHub

Further, looking at the image layers on Docker Hub for the unstable tag, I see SABNZBD_VERSION=3.6.0. That said, I don't have much experience on the Dockerfile/image building side so I could be misunderstanding how it works.

thezoggy commented 2 years ago

Lsio doesn't pull dev, unstable just means it will do beta/rc releases. You would need to switch to using hotio if you really do want to have the ability to just use bleeding edge when needed. Otherwise you will have to just wait.

Safihre commented 2 years ago

The git version won't fix this.. It's something deeper.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.