Page 1 of 1

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

Posted: March 17th, 2017, 2:05 pm
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:~$ 

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

Posted: March 21st, 2017, 5:19 am
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).

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

Posted: March 21st, 2017, 5:48 am
by sander
OK, clear. Thanks for clarifying.

Case closed.