linuxserver/docker-sabnzbd

[BUG] Sab fails to start with "Missing module: sabctools" error.

LapinFou opened this issue · 36 comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

With the latest version 4.0.1-ls108, sabnzbd doesn't start anymore.

Expected Behavior

No response

Steps To Reproduce

Just install the latest version

Environment

No response

CPU architecture

x86-64

Docker creation

version: "3.5"
services:
  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd:latest
    container_name: sabnzbd
    environment:
      - PUID=1052
      - PGID=100
      - TZ=Europe/Paris
    volumes:
      - /volume1/download:/downloads
      - /volume1/docker/sabnzbd/config:/config
      - /volume1/docker/sabnzbd/scripts:/scripts
    ports:
      - 8080:8080
    restart: unless-stopped

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
SABnzbd: https://sabnzbd.org/donate
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1052
User GID:    100
───────────────────────────────────────
[custom-init] No custom files found, skipping...
Not all required Python modules are available, please check requirements.txt
Missing module: sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders
Not all required Python modules are available, please check requirements.txt
Missing module: sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders
Not all required Python modules are available, please check requirements.txt
Missing module: sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders
Not all required Python modules are available, please check requirements.txt
Missing module: sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders
Not all required Python modules are available, please check requirements.txt
Missing module: sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders
Not all required Python modules are available, please check requirements.txt
Missing module: sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders
Not all required Python modules are available, please check requirements.txt

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Im having the same issue, tried repulling, tried deleting image and repulling. recreated container. same thing

Im having the same issue, tried repulling, tried deleting image and repulling. recreated container. same thing

pulling 4.0.1-ls107
instead of latest fixed the issue for me

Please can you provide the full output of docker inspect sabnzbd as well as confirming whether you're using Portainer for deployment, and which version of Docker you are running.

"Me too" doesn't help anyone, please provide useful information that might enable us to identify a cause.

Please can you provide the full output of docker inspect sabnzbd as well as confirming whether you're using Portainer for deployment, and which version of Docker you are running.

docker inspect sabnzbd
https://pastebin.com/0HSsw3Qd

Yes I'm using portainer
sudo docker -v
Docker version 20.10.3, build b35e731

Adding /lsiopy/bin to my PATH variable fixed it for me.

You don't need to add anything to the PATH variable. In fact, you should not be setting PATH as an env var at all. It is not something that should be set externally.

If your docker management app/gui/system (looking at you, portainer) is setting these env vars externally, please report the issue to them and do not use those apps until they fix it.

These vars are meant to be set internally within the dockerfiles, not externally.

Yeah it looks like Portainer is merrily copying the old envs into the recreated container whenever you do an update, nuking anything that's been updated in the new image.

Utterly stupid behaviour.

Mine were likely there from some old setup tutorial, I'm not using portainer. I noticed the build change in the recent commit and figured it was likely a pathing issue. As you mentioned, removing PATH completely also worked so I've made that change instead.

I'm using Portainer 2.18.2 (BE) on a Synology NAS (916+, x86 ,CPU).
Interestingly, I rolled back to the version 4.0.1-ls107.
When I read the @thespad request (docker version + container info), I installed again the latest version but this time it did work! 😅

I'm going to close this on the basis that it's not a container issue, it's an issue with Portainer overwriting the container environment when recreating it (or users manually doing the same), which breaks any changes we might make on the image (such as with this release).

Never mind. I read through again and realized I was importing configs from the last version. All is good now.

~~I am getting the same error in Docker on Synology with v4.0.1-ls107. Seeing the same error text in the log:

Not all required Python modules are available, please check requirements.txt
Missing module: sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders

Inspect results: https://gist.github.com/gridlockjoe/a06c9a0b1665fd11d007b1f89926de6d~~

From your inspect results the issue is your PATH:
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
Either remove PATH or add /lsiopy/bin to the list of directories.

From your inspect results the issue is your PATH:

"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",

Either remove PATH or add /lsiopy/bin to the list of directories.

Thanks! I found that reloading the previous version's config through Docker brought in the old path. I recreated from scratch and all is good.

I've been running into the same problem with sabnzbd, running on Flatcar Container Linux. The PATH had /lsiopy/bin at the beginning, but I was still getting errors about sabctools missing. Someone suggested rolling the Docker image back to the previous version (4.0.1-ls107). I did that and the container started properly. Here's where it gets weird: when I then did sudo systemctl stop sabnzbd && docker container rm sabnzbd && docker image prune -a && sudo systemctl start sabnzbd, it pulled in the latest, previously troublesome image...and it worked. I have no idea if the image changed somewhere along the way (didn't keep track of the hashes), but sabnzbd is running again.

(The way my system is set up, /etc/systemd/system/sabnzbd.service creates the container if it doesn't exist, and then starts the container.)

I have tried three different approaches to resolve the issue:

  1. I removed the entire PATH entry.
  2. I attempted to add the PATH back and included ":/lsiopy/bin" as follows:
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/lsiopy/bin
  3. I also tried downloading amd64-4.0.1-ls107.

Unfortunately, none of these attempts have been successful in resolving the problem. I am in need of assistance. Please help!

here is the result of
docker inspect sabnzbd
inspect.txt

Same issue here now with the latest install today. Rolling back to 4.0.1 as above gets it back working again.

This is docker, on synology, so not a portainer issue but could well be a setup issue on my part. I followed trashes guide a couple of years ago, all been well until now. Will stay on old version for a while to see if something becomes clear.

@shawn8888 your PATH is wrong. Remove all user defined PATH setting and recreate the container

@mrbamber it's an issue with your PATH setting. Remove all user defined PATH setting and recreate the container

Synology's Docker management UI has the same issue as Portainer, see https://info.linuxserver.io/issues/2023-05-22-portainer/

Thanks, yeh synology docker doing the same, just clearing the path and resetting the container wouldn't get it tho, but it would allow me to ammend the path to /lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

and then reset and run

appreciate not the best way and further issues likely but will wait for the synology fixes. Appreciate the explanation to understand what's going on and a docker issue as you say.

Synology are unlikely to fix this, honestly. We would recommend migrating to docker compose instead.

@shawn8888 your PATH is wrong. Remove all user defined PATH setting and recreate the container

Yes, I use Synology.
What's the correct PATH? Should I delete it or add "/lsiopy/bin"
I have to admit that I haven't update docker container for a long time. Maybe that's why?

I don't know how Synology ui works, but it is reading the internal environment variables from the previous container and manually setting them in the new container. It causes an issue when we change the vars inside the image, because Synology is forcing the old and outdated vars.

If you can't remove it or prevent Synology from setting it manually, you can edit it, but you need to add the /lsiopy/bin to the beginning of PATH, not the end

@aptalca

Moving "/lsiopy/bin:" to the beginning of the PATH worked!
Never thought PATH variable order had such a big impact.
I appreciate your help!

I had same problem on Synolgy with Docker.
Here was how to do the fix specifically:

  1. stop container
  2. Select the container by clicking it anywhere, then click edit (at top)
  3. Under General Settings tab click Advanced Settings
  4. Click the PATH variable, then DELETE, then Save.
  5. Reset the container, then start.

I don't understand why this was necessary....never happened before and when rolling back to 4.01 it works fine.

in NO circumstance is the fix to manually change the path. If you should do anything with it, remove it, and let the image manage it itself, like on any sane system.

This is only necessary due to poor implementation of updates of images.

@Roxedus Thanks, I just tried your suggestion, which also fixed the path. I will update my previous comment.

irishj commented

I'm using docker in Synology and also manage it through portainer and experienced the same issue.

To fix, I removed the container via command line "docker rm sab" and then re-created it via command line with "docker create" and this resolved the issue, just for anyone using docker on Synology or managing through Portainer.

Synology user. Thank you all for the work you did.
My actions: Stop container, Export (JIC), Delete container, Go to Images, Launch, Go through wizard (checked Path, which was correct.) PUID, GUID, Ports and folders. Win go get some coffee.

I ran into this same problem with Portainer. I also had my stuff configured as stacks and it turns out the easiest solution for me was to stop and start the stack. That created the new container with only the appropriate envs. Hope this helps someone else!

I ran into this same problem with Portainer. I also had my stuff configured as stacks and it turns out the easiest solution for me was to stop and start the stack. That created the new container with only the appropriate envs. Hope this helps someone else!

Portainer user. Did the usual upgrade procedure of pulling new image and recreating container. Got error as described in the issue. Based on the comments in this thread, the below fixed it.

  • stop container
  • edit/duplicate container
  • delete all the env's that Portainer creates (and subsequently applies to future containers)
  • leave only the 3 env's that LSIO specifies (PUID, PGID, TZ)
  • deploy container

I'll have to add to my run book to clean up the env's in future upgrades.

Thanks for the guidance @aptalca @thespad

FYI, here are a couple of ways I worked around the Synology ENV variable problem with Portainer:

https://github.com/mikespub-org/docker-quickstart-python/blob/master/synology.md

Anyone here using portainer,

Only steps I took to fix the issue, was to go into the stack menu, and deploy the SABNZB stack.

Issue completely went away

I had same problem on Synolgy with Docker. Here was how to do the fix specifically:

1. stop container

2. Select the container by clicking it anywhere,  then click edit (at top)

3. Under General Settings tab click Advanced Settings

4. Click the PATH variable, then DELETE, then Save.

5. Reset the container, then start.

I don't understand why this was necessary....never happened before and when rolling back to 4.01 it works fine.

Just want to chime in to state that updating the container Sabnzbd in GUI Docker on a Synology NAS will still not work. The process listed above worked flawlessly and was fairly simple.