New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sabnzbd : Failed to run the package service #1594

Closed
Hemie143 opened this Issue Mar 23, 2015 · 20 comments

Comments

Projects
None yet
3 participants
@Hemie143

Hemie143 commented Mar 23, 2015

Hello,

Here's my setup:
Synology DS112+
DSM 5.1-5022 Update 4
SABnzbd 0.7.20-13
Python 2.7.9-13

Since the upgrade to Python 2.7.9-12, SABnzbd refuses to start. I have read several of the issues that were more or less related to a similar but nothing helped.

I have uninstalled everything (Python, SABnzbd, Sickbeard, CoucPotato, ...) rebooted and re-installed, but that didn't work either.

The folder /var/packages/sabznbd/scripts is populated. The log from the GUI is empty. Not sure, but I think that the log file should be in /usr/local/sabnzbd/var/logs/sabnzbd.log. However, I didn't find any /usr/local/sabnzbd/var/logs/ folder, so I created one. The restart didn't work better and the folder remains empty.

When I launch the script start-stop-status start, it says "Starting SABnzbd" and nothing else. There is no sabnzbd process.

Content of /usr/local/sabnzbd:
drwxr-xr-x 3 sabnzbd root 4096 Dec 31 15:08 app
drwxr-xr-x 2 sabnzbd root 4096 Mar 23 23:14 bin
drwxr-xr-x 5 sabnzbd root 4096 Mar 23 23:14 env
drwxr-xr-x 4 sabnzbd root 4096 Dec 31 15:08 share
drwxr-sr-x 4 sabnzbd root 4096 Mar 23 23:14 var

Content of /volume1/@appstore/:
drwxrwxrwx 9 root root 4096 Mar 12 22:45 AntiVirus
drwxrwxrwx 13 root root 4096 Jan 1 23:28 AudioStation
drwxr-xr-x 10 root root 4096 Mar 17 16:17 CloudSync
drwxrwxrwx 9 root root 4096 Mar 12 22:38 DNSServer
drwxrwxrwx 12 root root 4096 Jan 1 23:18 DownloadStation
drwxrwxrwx 7 root root 4096 Mar 12 23:54 MariaDB
drwxrwxrwx 11 root root 4096 Dec 12 21:42 MediaServer
drwxrwxrwx 4 root root 4096 Dec 12 21:44 Perl
drwxrwxrwx 10 root root 4096 Jan 23 15:26 PhotoStation
drwxrwxrwx 12 root root 4096 Feb 26 01:16 VideoStation
drwxrwxrwx 5 root root 4096 Mar 12 22:37 Webalizer
drwxrwxrwx 8 root root 4096 Mar 12 22:46 iTunesServer
drwxrwxrwx 4 root root 4096 Jan 1 23:21 phpMyAdmin
drwxrwxrwx 7 root root 4096 Mar 23 18:19 python
drwxr-xr-x 7 sabnzbd root 4096 Mar 23 23:14 sabnzbd

Content of /volume1/@appstore/sabnzbd:
drwxr-xr-x 3 sabnzbd root 4096 Dec 31 15:08 app
drwxr-xr-x 2 sabnzbd root 4096 Mar 23 23:14 bin
drwxr-xr-x 5 sabnzbd root 4096 Mar 23 23:14 env
drwxr-xr-x 4 sabnzbd root 4096 Dec 31 15:08 share
drwxr-sr-x 4 sabnzbd root 4096 Mar 23 23:14 var

Content of /var/packages/sabnzbd:
-rw-r--r-- 1 root root 16078 Mar 23 23:14 INFO
drwxr-xr-x 2 root root 4096 Dec 31 15:08 WIZARD_UIFILES
lrwxrwxrwx 1 root root 30 Mar 23 23:14 etc -> /usr/syno/etc/packages/sabnzbd
drwxr-xr-x 2 root root 4096 Dec 31 15:08 scripts
lrwxrwxrwx 1 root root 26 Mar 23 23:14 target -> /volume1/@appstore/sabnzbd

Content of /var/log/messages:
Mar 23 23:10:52 DiskStation entry.cgi_SYNO.Core.Package.Control[1].start[7054]: pkgstartstop.cpp:182 Failed to start package sabnzbd, [2]
Mar 23 23:14:52 DiskStation entry.cgi_SYNO.Core.Package.Control[1].start[9165]: pkgstartstop.cpp:182 Failed to start package sabnzbd, [2]

Content of /var/log/synopkg.log
2015/03/23 23:14:44 install sabnzbd 0.7.20-13 successfully
2015/03/23 23:14:45 start sabnzbd: begin to start version 0.7.20-13
2015/03/23 23:14:52 stop sabnzbd: begin to stop version 0.7.20-13
2015/03/23 23:14:52 stop sabnzbd: stop version 0.7.20-13 successfully, result 0
2015/03/23 23:14:52 start sabnzbd: start version 0.7.20-13 failed, result 263

Any help is welcome.

Cheers,

Hemie143

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Mar 24, 2015

Member

The SAB package needs an new release due to some changes in the way Python works. We'll get to that as soon as we can.

Member

Dr-Bean commented Mar 24, 2015

The SAB package needs an new release due to some changes in the way Python works. We'll get to that as soon as we can.

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Mar 24, 2015

Great. Thanks for the confirmation. I couldn't find any confirmation of this issue anywhere and couldn't understand what was wrong in my setup.
I'm looking forward to this new SAB release.

Hemie143 commented Mar 24, 2015

Great. Thanks for the confirmation. I couldn't find any confirmation of this issue anywhere and couldn't understand what was wrong in my setup.
I'm looking forward to this new SAB release.

@bmcharg

This comment has been minimized.

Show comment
Hide comment
@bmcharg

bmcharg Mar 24, 2015

Same issues seen here since the update. Is there an eta on a patch / release? Or am I better to roll back to previous versions of both Python and SabNZBD?

bmcharg commented Mar 24, 2015

Same issues seen here since the update. Is there an eta on a patch / release? Or am I better to roll back to previous versions of both Python and SabNZBD?

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Mar 24, 2015

Actually, I tried to rollback Python, but couldn't find the correct URLs for the packages.

Hemie143 commented Mar 24, 2015

Actually, I tried to rollback Python, but couldn't find the correct URLs for the packages.

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Mar 30, 2015

Just for tests, I rolled back on the Python release (3f8ddf1) and compiled it for my platform. Same for SABnzbd but it isn't working better. SABnzbd hasn't changed in the last 3 months and the update to Python 2.7.9 is only 11 days old. Where's my mistake ?

How does it come that some people are still able to run SABnzbd and only have SSL or folder issues ?

Hemie143 commented Mar 30, 2015

Just for tests, I rolled back on the Python release (3f8ddf1) and compiled it for my platform. Same for SABnzbd but it isn't working better. SABnzbd hasn't changed in the last 3 months and the update to Python 2.7.9 is only 11 days old. Where's my mistake ?

How does it come that some people are still able to run SABnzbd and only have SSL or folder issues ?

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Mar 30, 2015

Member

Because you didn't go back far enough. It's not an incompatibility with Python 2.7.9 in particular, it's because of one of the modules that Python uses, which was updated with 4536951

That said, it might be faster to recompile SABnzbd (with the current code), and try that with the current Python package. I have not tested the current code, which is why the package hasn't been updated yet, but afaik, it should work.

Member

Dr-Bean commented Mar 30, 2015

Because you didn't go back far enough. It's not an incompatibility with Python 2.7.9 in particular, it's because of one of the modules that Python uses, which was updated with 4536951

That said, it might be faster to recompile SABnzbd (with the current code), and try that with the current Python package. I have not tested the current code, which is why the package hasn't been updated yet, but afaik, it should work.

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Mar 30, 2015

Ow, nice. Thanks for the tip. I will try from that commit then. I'm fully aware that's not the safest solution, but I still wanna try... and I'm at least learning some stuff.

Hemie143 commented Mar 30, 2015

Ow, nice. Thanks for the tip. I will try from that commit then. I'm fully aware that's not the safest solution, but I still wanna try... and I'm at least learning some stuff.

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Mar 30, 2015

Member

You'll want to use the commit before that one then ;) Pip should be version 1.5.x, not 6.x.x.

Member

Dr-Bean commented Mar 30, 2015

You'll want to use the commit before that one then ;) Pip should be version 1.5.x, not 6.x.x.

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Mar 30, 2015

Yes, indeed. I meant that. I saw that the commit before that refers to pip 1.5.6. Let's cross the fingers. I'll try to compile the packages this this evening. Thanks for your prompt replies.

Hemie143 commented Mar 30, 2015

Yes, indeed. I meant that. I saw that the commit before that refers to pip 1.5.6. Let's cross the fingers. I'll try to compile the packages this this evening. Thanks for your prompt replies.

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Mar 30, 2015

Mmmh, there must be something else. After compilation, the SABnzbd package still fails to start.
The /var/log/messages now contains this:
Mar 30 18:40:51 DiskStation entry.cgi_SYNO.Core.Package.Control[1].start[21035]: pkgstartstop.cpp:182 Failed to start package sabnzbd, [1]

Content of /var/log/synopkg.log
2015/03/30 18:38:03 install python 2.7.8-11 successfully
2015/03/30 18:40:49 install sabnzbd 0.7.20-13: run postinst ret=[0]
2015/03/30 18:40:49 sabnzbd stderr: adduser: no uids left
chown: unknown user/group sabnzbd:root

2015/03/30 18:40:49 install sabnzbd 0.7.20-13 successfully
2015/03/30 18:40:51 start sabnzbd: begin to start version 0.7.20-13
2015/03/30 18:40:51 stop sabnzbd: begin to stop version 0.7.20-13
2015/03/30 18:40:51 stop sabnzbd: stop version 0.7.20-13 successfully, result 0
2015/03/30 18:40:51 start sabnzbd: start version 0.7.20-13 failed, result 263

Hemie143 commented Mar 30, 2015

Mmmh, there must be something else. After compilation, the SABnzbd package still fails to start.
The /var/log/messages now contains this:
Mar 30 18:40:51 DiskStation entry.cgi_SYNO.Core.Package.Control[1].start[21035]: pkgstartstop.cpp:182 Failed to start package sabnzbd, [1]

Content of /var/log/synopkg.log
2015/03/30 18:38:03 install python 2.7.8-11 successfully
2015/03/30 18:40:49 install sabnzbd 0.7.20-13: run postinst ret=[0]
2015/03/30 18:40:49 sabnzbd stderr: adduser: no uids left
chown: unknown user/group sabnzbd:root

2015/03/30 18:40:49 install sabnzbd 0.7.20-13 successfully
2015/03/30 18:40:51 start sabnzbd: begin to start version 0.7.20-13
2015/03/30 18:40:51 stop sabnzbd: begin to stop version 0.7.20-13
2015/03/30 18:40:51 stop sabnzbd: stop version 0.7.20-13 successfully, result 0
2015/03/30 18:40:51 start sabnzbd: start version 0.7.20-13 failed, result 263

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Mar 30, 2015

Member

Ah, right. That's the busybox upgrade which was updated with 89e31bf. Because you did the checkout just before pip was updated, you're missing the fix implemented with 81d8945.
So, either go back to the commit before the busybox upgrade, or add the fix manually.

Member

Dr-Bean commented Mar 30, 2015

Ah, right. That's the busybox upgrade which was updated with 89e31bf. Because you did the checkout just before pip was updated, you're missing the fix implemented with 81d8945.
So, either go back to the commit before the busybox upgrade, or add the fix manually.

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Mar 30, 2015

Sorry, something is still missing. I checked out with the commit before 89e31bf and applied the fix manually, as in 81d8945.

Content of /var/log/synopkg.log
2015/03/31 00:56:13 install python 2.7.8-11 successfully
2015/03/31 01:04:38 install sabnzbd 0.7.20-13 successfully
2015/03/31 01:04:39 start sabnzbd: begin to start version 0.7.20-13
2015/03/31 01:04:45 stop sabnzbd: begin to stop version 0.7.20-13
2015/03/31 01:04:45 stop sabnzbd: stop version 0.7.20-13 successfully, result 0
2015/03/31 01:04:45 start sabnzbd: start version 0.7.20-13 failed, result 263

I have no idea how to retrieve more information about the error.

Hemie143 commented Mar 30, 2015

Sorry, something is still missing. I checked out with the commit before 89e31bf and applied the fix manually, as in 81d8945.

Content of /var/log/synopkg.log
2015/03/31 00:56:13 install python 2.7.8-11 successfully
2015/03/31 01:04:38 install sabnzbd 0.7.20-13 successfully
2015/03/31 01:04:39 start sabnzbd: begin to start version 0.7.20-13
2015/03/31 01:04:45 stop sabnzbd: begin to stop version 0.7.20-13
2015/03/31 01:04:45 stop sabnzbd: stop version 0.7.20-13 successfully, result 0
2015/03/31 01:04:45 start sabnzbd: start version 0.7.20-13 failed, result 263

I have no idea how to retrieve more information about the error.

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Apr 1, 2015

Member

Run this command via the command line on your Synology, see what it tells you:

su sabnzbd -c "PATH=/usr/local/sabnzbd/bin:/usr/local/sabnzbd/env/bin:/usr/local/python/bin:${PATH} /usr/local/sabnzbd/env/bin/python /usr/local/sabnzbd/share/SABnzbd/SABnzbd.py -f /usr/local/sabnzbd/var/config.ini --pidfile /usr/local/sabnzbd/var/sabnzbd.pid -d"

If it starts, the sabnzbd log might also contain some info: /usr/local/sabnzbd/var/logs/sabnzbd.log

Member

Dr-Bean commented Apr 1, 2015

Run this command via the command line on your Synology, see what it tells you:

su sabnzbd -c "PATH=/usr/local/sabnzbd/bin:/usr/local/sabnzbd/env/bin:/usr/local/python/bin:${PATH} /usr/local/sabnzbd/env/bin/python /usr/local/sabnzbd/share/SABnzbd/SABnzbd.py -f /usr/local/sabnzbd/var/config.ini --pidfile /usr/local/sabnzbd/var/sabnzbd.pid -d"

If it starts, the sabnzbd log might also contain some info: /usr/local/sabnzbd/var/logs/sabnzbd.log

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Apr 1, 2015

I tried that earlier already and this didn't produce any output. Also, I have the /usr/local/sabnzbd/var/logs/ folder, but no sabnzbd.log in it. I "touched" it, but it remains empty.
The file and folder are owned by the user sabnzbd.

I don't understand what's happening and I don't know enough to gather more information.

Hemie143 commented Apr 1, 2015

I tried that earlier already and this didn't produce any output. Also, I have the /usr/local/sabnzbd/var/logs/ folder, but no sabnzbd.log in it. I "touched" it, but it remains empty.
The file and folder are owned by the user sabnzbd.

I don't understand what's happening and I don't know enough to gather more information.

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Apr 2, 2015

Member

Ok, then try this:

su sabnzbd -c "PATH=/usr/local/sabnzbd/bin:/usr/local/sabnzbd/env/bin:/usr/local/python/bin:${PATH} /usr/local/sabnzbd/env/bin/python /usr/local/sabnzbd/share/SABnzbd/SABnzbd.py -f /usr/local/sabnzbd/var/config.ini --pidfile /usr/local/sabnzbd/var/sabnzbd.pid"

You should see a whole lot of text scrolling by, ending in something like this:

2015-04-02 01:36:36,328::INFO::[SABnzbd:1597] Starting SABnzbd.py-0.7.20
2015-04-02 01:36:36,334::INFO::[dirscanner:277] Dirscanner starting up
2015-04-02 01:36:36,338::INFO::[urlgrabber:77] URLGrabber starting up

Paste the output you're getting on gist.github.com or pastebin, and provide the link here (or maybe take a screenshot, but make sure it's legible...)

Member

Dr-Bean commented Apr 2, 2015

Ok, then try this:

su sabnzbd -c "PATH=/usr/local/sabnzbd/bin:/usr/local/sabnzbd/env/bin:/usr/local/python/bin:${PATH} /usr/local/sabnzbd/env/bin/python /usr/local/sabnzbd/share/SABnzbd/SABnzbd.py -f /usr/local/sabnzbd/var/config.ini --pidfile /usr/local/sabnzbd/var/sabnzbd.pid"

You should see a whole lot of text scrolling by, ending in something like this:

2015-04-02 01:36:36,328::INFO::[SABnzbd:1597] Starting SABnzbd.py-0.7.20
2015-04-02 01:36:36,334::INFO::[dirscanner:277] Dirscanner starting up
2015-04-02 01:36:36,338::INFO::[urlgrabber:77] URLGrabber starting up

Paste the output you're getting on gist.github.com or pastebin, and provide the link here (or maybe take a screenshot, but make sure it's legible...)

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Apr 2, 2015

OK, starting the process but not in daemon mode.

Then the error showed up immediately, sabnzbd couldn't edit the config.ini file. I can't understand why but the owner wasn't the user sabnzbd anymore, but root and the permissions weren't correct either.
So, I just corrected that and restarted sabnzbd without any issue now. It's working again. Thanks for the advice !
My setup is still based on sabnzbd 0.7.20, but I'm using a python package (2.7.8-11) I compiled from 78ef640. If there are requests for the python packages, I can maybe post them somewhere.

Thanks for your support.

EDIT: There is still something strange. I was previously using port 8080. After the upgrade, the port changed to 8085. If I change the port back to 8080, sabnzbd won't start. And there is nothing listening on port 8080. If I use port 8085, it's working, even if the GUI tells me to log to port 8080.
Secondly, my post-processing script doesn't seem to work anymore, although the path is correct and the file permissions are also OK.

EDIT2: I had to change the first line of the script. It was previously #!/usr/bin/python and changed it to #!/usr/local/python/bin/python -OO

Hemie143 commented Apr 2, 2015

OK, starting the process but not in daemon mode.

Then the error showed up immediately, sabnzbd couldn't edit the config.ini file. I can't understand why but the owner wasn't the user sabnzbd anymore, but root and the permissions weren't correct either.
So, I just corrected that and restarted sabnzbd without any issue now. It's working again. Thanks for the advice !
My setup is still based on sabnzbd 0.7.20, but I'm using a python package (2.7.8-11) I compiled from 78ef640. If there are requests for the python packages, I can maybe post them somewhere.

Thanks for your support.

EDIT: There is still something strange. I was previously using port 8080. After the upgrade, the port changed to 8085. If I change the port back to 8080, sabnzbd won't start. And there is nothing listening on port 8080. If I use port 8085, it's working, even if the GUI tells me to log to port 8080.
Secondly, my post-processing script doesn't seem to work anymore, although the path is correct and the file permissions are also OK.

EDIT2: I had to change the first line of the script. It was previously #!/usr/bin/python and changed it to #!/usr/local/python/bin/python -OO

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Apr 3, 2015

Member

Looks like your configuration has been reset to original, or is corrupt. No changes should be needed to the first line of the script, if you start the package via Package Center/the start-stop-status script.
I'd recommend a clean installation of the package.

As for the Python packages, no need to share them (edit: let's make that a strong suggestion that you really shouldn't share them: you have compiled a package containing part of the -11 version, and part of the -12 version).
I've verified that both packages work correctly with each other. If you have issues with running the current SAB package with the current Python package: it's a local issue.

Member

Dr-Bean commented Apr 3, 2015

Looks like your configuration has been reset to original, or is corrupt. No changes should be needed to the first line of the script, if you start the package via Package Center/the start-stop-status script.
I'd recommend a clean installation of the package.

As for the Python packages, no need to share them (edit: let's make that a strong suggestion that you really shouldn't share them: you have compiled a package containing part of the -11 version, and part of the -12 version).
I've verified that both packages work correctly with each other. If you have issues with running the current SAB package with the current Python package: it's a local issue.

@Hemie143

This comment has been minimized.

Show comment
Hide comment
@Hemie143

Hemie143 Apr 3, 2015

How do make sure that you have a clean install ? I guess it's not simply uninstalling the packages from the GUI.

Hemie143 commented Apr 3, 2015

How do make sure that you have a clean install ? I guess it's not simply uninstalling the packages from the GUI.

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Apr 3, 2015

Member

Well, it usually is. However, in you case, manual changes to the setup might mean things will be left behind after uninstalling.
So, before installing the packages, make sure that /usr/local/{package} does not exist (for both Python and SABnzbd), that should usually be enough.

Member

Dr-Bean commented Apr 3, 2015

Well, it usually is. However, in you case, manual changes to the setup might mean things will be left behind after uninstalling.
So, before installing the packages, make sure that /usr/local/{package} does not exist (for both Python and SABnzbd), that should usually be enough.

@Dr-Bean

This comment has been minimized.

Show comment
Hide comment
@Dr-Bean

Dr-Bean Apr 19, 2015

Member

If the problem still exists after reinstalling, feel free to report it. Until then, let's close this :)

Member

Dr-Bean commented Apr 19, 2015

If the problem still exists after reinstalling, feel free to report it. Until then, let's close this :)

@Dr-Bean Dr-Bean closed this Apr 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment