Error on upgrade - Jaunty

Bug #505788 reported by Babu
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
pdns-recursor (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: pdns-recursor

On trying to update pdns-recursor through Update manager, the following error was reported :

Errors were encountered while processing:
 /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: error processing pdns-recursor (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.

Tried reinstall using the command :

sudo apt-get install --reinstall pdns-recursor

Returns the error :

Preparing to replace pdns-recursor 3.1.7-2ubuntu0.1 (using .../pdns-recursor_3.1.7-2ubuntu0.2_i386.deb) ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
postinst called with unknown argument `abort-upgrade'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess new pre-removal script returned error exit status 1
Package: pdns-recursor 3.1.7-2ubuntu0.1
SourcePackage: pdns-recursor
Title: package pdns-recursor 3.1.7-2ubuntu0.1 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1
Uname: Linux 2.6.30-02063004-generic i686

Revision history for this message
Babu (kalakrishnan) wrote :
Revision history for this message
Imre Gergely (cemc) wrote :

Could you upload your current /etc/init.d/pdns-recursor file to http://pastebin.ubuntu.com/ please?

Thanks.

Changed in pdns-recursor (Ubuntu):
status: New → Incomplete
Revision history for this message
Babu (kalakrishnan) wrote : Re: [Bug 505788] Re: Error on upgrade - Jaunty

Done. Thanks for the prompt response.

On Wed, Jan 13, 2010 at 7:47 PM, Imre Gergely <email address hidden> wrote:

> Could you upload your current /etc/init.d/pdns-recursor file to
> http://pastebin.ubuntu.com/ please?
>
> Thanks.
>
> ** Changed in: pdns-recursor (Ubuntu)
> Status: New => Incomplete
>
> --
> Error on upgrade - Jaunty
> https://bugs.launchpad.net/bugs/505788
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pdns-recursor” package in Ubuntu: Incomplete
>
> Bug description:
> Binary package hint: pdns-recursor
>
> On trying to update pdns-recursor through Update manager, the following
> error was reported :
>
> Errors were encountered while processing:
> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> A package failed to install. Trying to recover:
> dpkg: error processing pdns-recursor (--configure):
> Package is in a very bad inconsistent state - you should
> reinstall it before attempting configuration.
>
> Tried reinstall using the command :
>
> sudo apt-get install --reinstall pdns-recursor
>
> Returns the error :
>
> Preparing to replace pdns-recursor 3.1.7-2ubuntu0.1 (using
> .../pdns-recursor_3.1.7-2ubuntu0.2_i386.deb) ...
> * Stopping PowerDNS recursor pdns-recursor
> invoke-rc.d: initscript pdns-recursor, action "stop" failed.
> dpkg: warning - old pre-removal script returned error exit status 1
> dpkg - trying script from the new package instead ...
> * Stopping PowerDNS recursor pdns-recursor
> invoke-rc.d: initscript pdns-recursor, action "stop" failed.
> dpkg: error processing
> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb (--unpack):
> subprocess new pre-removal script returned error exit status 1
> postinst called with unknown argument `abort-upgrade'
> dpkg: error while cleaning up:
> subprocess post-installation script returned error exit status 1
> Errors were encountered while processing:
> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> ProblemType: Package
> Architecture: i386
> DistroRelease: Ubuntu 9.04
> ErrorMessage: subprocess new pre-removal script returned error exit status
> 1
> Package: pdns-recursor 3.1.7-2ubuntu0.1
> SourcePackage: pdns-recursor
> Title: package pdns-recursor 3.1.7-2ubuntu0.1 failed to install/upgrade:
> subprocess new pre-removal script returned error exit status 1
> Uname: Linux 2.6.30-02063004-generic i686
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/pdns-recursor/+bug/505788/+subscribe
>

Revision history for this message
Babu (kalakrishnan) wrote :

This is the link to the file I pasted

http://pastebin.ubuntu.com/356137/

On Wed, Jan 13, 2010 at 10:34 PM, BK <email address hidden> wrote:

> Done. Thanks for the prompt response.
>
>
> On Wed, Jan 13, 2010 at 7:47 PM, Imre Gergely <email address hidden> wrote:
>
>> Could you upload your current /etc/init.d/pdns-recursor file to
>> http://pastebin.ubuntu.com/ please?
>>
>> Thanks.
>>
>> ** Changed in: pdns-recursor (Ubuntu)
>> Status: New => Incomplete
>>
>> --
>> Error on upgrade - Jaunty
>> https://bugs.launchpad.net/bugs/505788
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>> Status in “pdns-recursor” package in Ubuntu: Incomplete
>>
>> Bug description:
>> Binary package hint: pdns-recursor
>>
>> On trying to update pdns-recursor through Update manager, the following
>> error was reported :
>>
>> Errors were encountered while processing:
>> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
>> E: Sub-process /usr/bin/dpkg returned an error code (1)
>> A package failed to install. Trying to recover:
>> dpkg: error processing pdns-recursor (--configure):
>> Package is in a very bad inconsistent state - you should
>> reinstall it before attempting configuration.
>>
>> Tried reinstall using the command :
>>
>> sudo apt-get install --reinstall pdns-recursor
>>
>> Returns the error :
>>
>> Preparing to replace pdns-recursor 3.1.7-2ubuntu0.1 (using
>> .../pdns-recursor_3.1.7-2ubuntu0.2_i386.deb) ...
>> * Stopping PowerDNS recursor pdns-recursor
>> invoke-rc.d: initscript pdns-recursor, action "stop" failed.
>> dpkg: warning - old pre-removal script returned error exit status 1
>> dpkg - trying script from the new package instead ...
>> * Stopping PowerDNS recursor pdns-recursor
>> invoke-rc.d: initscript pdns-recursor, action "stop" failed.
>> dpkg: error processing
>> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb (--unpack):
>> subprocess new pre-removal script returned error exit status 1
>> postinst called with unknown argument `abort-upgrade'
>> dpkg: error while cleaning up:
>> subprocess post-installation script returned error exit status 1
>> Errors were encountered while processing:
>> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
>> E: Sub-process /usr/bin/dpkg returned an error code (1)
>>
>> ProblemType: Package
>> Architecture: i386
>> DistroRelease: Ubuntu 9.04
>> ErrorMessage: subprocess new pre-removal script returned error exit status
>> 1
>> Package: pdns-recursor 3.1.7-2ubuntu0.1
>> SourcePackage: pdns-recursor
>> Title: package pdns-recursor 3.1.7-2ubuntu0.1 failed to install/upgrade:
>> subprocess new pre-removal script returned error exit status 1
>> Uname: Linux 2.6.30-02063004-generic i686
>>
>> To unsubscribe from this bug, go to:
>>
>> https://bugs.launchpad.net/ubuntu/+source/pdns-recursor/+bug/505788/+subscribe
>>
>
>

Revision history for this message
Imre Gergely (cemc) wrote :

What version of pdns-recursor do you have installed currently? Please paste output of the following commands:

apt-cache policy pdns-recursor
dpkg -l 'pdns-recursor'

Did you try to install a package manually? Did you edit the init script by any change between installs?

Revision history for this message
Babu (kalakrishnan) wrote :
Download full text (3.8 KiB)

Output of "apt-cache policy pdns-recursor"
-------------------------------------
pdns-recursor:
  Installed: 3.1.7-2ubuntu0.1
  Candidate: 3.1.7-2ubuntu0.2
  Version table:
     3.1.7-2ubuntu0.2 0
        500 http://in.archive.ubuntu.com jaunty-updates/universe Packages
        500 http://in.archive.ubuntu.com jaunty-security/universe Packages
 *** 3.1.7-2ubuntu0.1 0
        100 /var/lib/dpkg/status
     3.1.7-2 0
        500 http://in.archive.ubuntu.com jaunty/universe Packages
----------------------------------

Output of "dpkg -l pdns-recursor"

Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
iFR pdns-recursor 3.1.7-2ubuntu0 PowerDNS recursor

--------------------------------------------------------

Note that these are the outputs of the system after the failure in upgrading
the package. I haven't done anything further with it.

On Wed, Jan 13, 2010 at 10:58 PM, Imre Gergely <email address hidden> wrote:

> What version of pdns-recursor do you have installed currently? Please
> paste output of the following commands:
>
> apt-cache policy pdns-recursor
> dpkg -l 'pdns-recursor'
>
> Did you try to install a package manually? Did you edit the init script
> by any change between installs?
>
> --
> Error on upgrade - Jaunty
> https://bugs.launchpad.net/bugs/505788
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pdns-recursor” package in Ubuntu: Incomplete
>
> Bug description:
> Binary package hint: pdns-recursor
>
> On trying to update pdns-recursor through Update manager, the following
> error was reported :
>
> Errors were encountered while processing:
> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> A package failed to install. Trying to recover:
> dpkg: error processing pdns-recursor (--configure):
> Package is in a very bad inconsistent state - you should
> reinstall it before attempting configuration.
>
> Tried reinstall using the command :
>
> sudo apt-get install --reinstall pdns-recursor
>
> Returns the error :
>
> Preparing to replace pdns-recursor 3.1.7-2ubuntu0.1 (using
> .../pdns-recursor_3.1.7-2ubuntu0.2_i386.deb) ...
> * Stopping PowerDNS recursor pdns-recursor
> invoke-rc.d: initscript pdns-recursor, action "stop" failed.
> dpkg: warning - old pre-removal script returned error exit status 1
> dpkg - trying script from the new package instead ...
> * Stopping PowerDNS recursor pdns-recursor
> invoke-rc.d: initscript pdns-recursor, action "stop" failed.
> dpkg: error processing
> /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb (--unpack):
> subprocess new pre-removal script returned error exit status 1
> postinst called with unknown argument `abort-upgrade'
> dpkg: error while cleaning up:
> subprocess post-installation script returned error exit status 1
> Errors were encountered while processing:
...

Read more...

Revision history for this message
Imre Gergely (cemc) wrote :

I see that pdns-recursor is not started by default. If you're not using it, or don't have any special configuration done, could you try the following:

- save the directory /etc/powerdns to some other dir, like: cp -a /etc/powerdns /root
- apt-get --purge remove pdns-recursor (this should remove the package and all related files)
- apt-get update
- apt-get install pdns-recursor (this should install the new version ubuntu0.2)

Please try this and let me know what happens.

Revision history for this message
Babu (kalakrishnan) wrote :

No luck - even purge seems to fail. This is my console output on trying that :
--------------------------------------------------------------------------
$ sudo apt-get --purge remove pdns-recursor
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  pdns-recursor*
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 1114kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: error processing pdns-recursor (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 pdns-recursor
E: Sub-process /usr/bin/dpkg returned an error code (1)
========================================================

I then tried the reinstall as suggested by apt-get, and that too failed with the following output :
--------------------------------------------------------------------------
$ sudo apt-get --reinstall install pdns-recursor
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  pdns-recursor
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0B/446kB of archives.
After this operation, 0B of additional disk space will be used.
Selecting previously deselected package pdns-recursor.
(Reading database ... 224913 files and directories currently installed.)
Preparing to replace pdns-recursor 3.1.7-2ubuntu0.1 (using .../pdns-recursor_3.1.7-2ubuntu0.2_i386.deb) ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
postinst called with unknown argument `abort-upgrade'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
========================================================

Please advice on further course of action.

Revision history for this message
Imre Gergely (cemc) wrote :

I'm kind of guessing from now on... what I would try now is the following:

- edit /var/lib/dpkg/info/pdns-recursor.prerm file, and add the following line after the line with 'set -e':
  set -x
- then edit /etc/init.d/pdns-recursor and add the same line after the first one (#!/bin/sh)
- then try a reinstall again like this:

  apt-get --reinstall install pdns-recursor | tee /tmp/pdns-recursor-install.log

- then attach the logfile to this bugreport.

This way maybe we can see where the .prerm script craps out, as this should give a lot of output.

Revision history for this message
Babu (kalakrishnan) wrote :

Here's the log file generated from "sudo apt-get --reinstall install pdns-recursor | tee /tmp/pdns-recursor-install.log"

Revision history for this message
Ben Jackson (benjackson84) wrote :

Any luck here guys? I'm getting the exact same problem as you.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pdns-recursor (Ubuntu) because there has been no activity for 60 days.]

Changed in pdns-recursor (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.