init script unable to start due to PID not created. Reproducible: Always Steps to Reproduce: 1. emerge sabnzbd 2. rc-update add sabnzbd default 3. rc Actual Results: oleg2 # rc * Caching service dependencies ... [ ok ] * Starting SABnzbd ... * start-stop-daemon: did not create a valid pid in `/run/sabnzbd/sabnzbd.pid' [ !! ] * ERROR: sabnzbd failed to start oleg2 #
Looks like this application only works with python-2.7, but its shebang calls "#!/usr/bin/python -OO" so it'll only run if you happen to have python-2.7 set as your system default. The ebuild should use some python eclass stuff to enforce the 2.7 requirement.
*** This bug has been marked as a duplicate of bug 600356 ***
i'm sorry but this doesnt look as any duplicate. #600356 indeed is about python2, which is solved. This one is about PID creation failure. Can such duplicate close explained somehow? Also, if #600356 supposed to fix start-up when default python is 3.x, then it's not fixed at all.
Did you sync your tree and try? Pidfile creation failure is most likely because sabnzbd failed to start due to not calling the correct python via the shebang as Ben pointed out. This was fixed. You can verify you have the changes locally with: $ head -n1 /usr/share/sabnzbd/SABnzbd.py #!/usr/bin/python2.7 -OO
oleg2 # head -n1 /usr/share/sabnzbd/SABnzbd.py #!/usr/bin/python2.7 -OO
its up-to-date: https://gitweb.gentoo.org/repo/gentoo.git/log/net-nntp/sabnzbd
revbump does not change anything: 1. rc-update del sabnzbd default 2. emerge -C sabnzbd 3. rm -rf /run/sabnzbd 4. emerge =sabnzbd-1.1.1-r1 5. rc-update add sabnzbd-1.1.1-r1 6. rc-update add sabnzbd default 7. rc oleg2 # rc * Caching service dependencies ... [ ok ] * Starting SABnzbd ... * start-stop-daemon: did not create a valid pid in `/run/sabnzbd/sabnzbd.pid' [ !! ] * ERROR: sabnzbd failed to start oleg2 # oleg2 # ls -l /var/db/pkg/net-nntp/ total 4.0K drwxr-xr-x 2 root root 4.0K Nov 21 17:05 sabnzbd-1.1.1-r1/ oleg2 #
There's a checkpath call in /etc/init.d/sabnzbd which should create /run/sabnzbd/ before the service starts, so your #3 rm step *shouldn't* be causing any problem... what version of openrc do you have?
Patch of bug 600356 works for me. PID is created at startup: fixe ~ # ls -l /run/sabnzbd/sabnzbd.pid -rw------- 1 sabnzbd sabnzbd 6 21 nov. 21:20 /run/sabnzbd/sabnzbd.pid “/run” is a tmpfs so init have to create the folder at each startup. Do you have something in /var/log/sabnzbd?
(In reply to Ben Kohler from comment #8) > There's a checkpath call in /etc/init.d/sabnzbd which should create > /run/sabnzbd/ before the service starts, so your #3 rm step *shouldn't* be > causing any problem... what version of openrc do you have? I removed it to have a clean test. 0.18.3
(In reply to Sébastien P. from comment #9) > Patch of bug 600356 works for me. > > PID is created at startup: > fixe ~ # ls -l /run/sabnzbd/sabnzbd.pid > -rw------- 1 sabnzbd sabnzbd 6 21 nov. 21:20 /run/sabnzbd/sabnzbd.pid > > “/run” is a tmpfs so init have to create the folder at each startup. > > Do you have something in /var/log/sabnzbd? i know this "tmpfs" stuff, thx. yes, i have log in /var/log/sabnzbd.
Created attachment 454010 [details] sabnzbd.error.log
looks upstream broke ipv6 in: https://github.com/sabnzbd/sabnzbd/commit/8e97097dfdcc81c0945fad869b8b7d04ee1e74a5#diff-04b3dd2f1c0744dada13dfa5cf487d9eR532 commenting ipv6 in /etc/hosts make sabnzbd start fine.
I tried several different /etc/sabnzbd/sabnzbd.ini with variant of ipv6_servers, no_ipv6, ipv6_hosting and host. I did not manage to reproduce your “TypeError: argument of type 'int' is not iterable”. Maybe you have an unsual combination of *ipv6* parameters/host. Since It seems to be an upstream bug, could you open it on their github?
Closing as upstream as this seems to require a particular set of configuration options (I'm also unable to reproduce). Oleg, if you report this upstream and get a patch, feel free to reopen and I'll add the patch to the ebuild.