"dpkg: error processing ..." due to SAB running in terminal

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

"dpkg: error processing ..." due to SAB running in terminal

Post by sander »

Hi @jcfp

With SAB running in another terminal, doing a upgrade, I got "dpkg: error processing package sabnzbdplus (--configure):".
Is this how it should? Or could it be better, in the upgrade process, to only start SABnzbd as service if it's running as service? That would avoid the error message, wouldn't it?

On my Ubuntu 14.04 I got this again and again:

Code: Select all

sander@flappie:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]  
Setting up sabnzbdplus (2.0.0~beta1-0ubuntu1~jcfp1~trusty) ...
 * Starting SABnzbd+ binary newsgrabber                                                                                                 [fail] 
invoke-rc.d: initscript sabnzbdplus, action "start" failed.
dpkg: error processing package sabnzbdplus (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 sabnzbdplus
E: Sub-process /usr/bin/dpkg returned an error code (1)
sander@flappie:~$ 
I then discovered I had SAB running from the commandline in another terminal

Code: Select all

sander@flappie:~$ ps -ef | grep -i sabnzbd
sander    4987 11012  0 19:57 pts/1    00:00:00 grep --color=auto -i sabnzbd
sander   32350 29929  0 15:12 pts/21   00:00:25 /usr/bin/python -OO ./SABnzbd.py
After stopping that, everything went OK:

Code: Select all

sander@flappie:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up sabnzbdplus (2.0.0~beta1-0ubuntu1~jcfp1~trusty) ...
 * Starting SABnzbd+ binary newsgrabber                                                                                                 [ OK ] 
sander@flappie:~$ 
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: "dpkg: error processing ..." due to SAB running in termi

Post by jcfp »

Unfortunately, there's no facility to only restart if it's running beforehand. The shutdown is handled by scripts of the old pkg before the update, the start after install by the new so that would require saving the state just for the chance of someone using the service but at the very moment of an update running the program manually. Not a very common scenario I guess, outside of testing or bug hunting and it would still leave one open to someone doing a manual start inbetween the stop and start of the service (with larger upgrades there'd be plenty of time for that).
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: "dpkg: error processing ..." due to SAB running in termi

Post by sander »

OK, clear. Thanks for clarifying.

Case closed.
Post Reply