[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dovecot Update Fails on Jessie



On Fri, Aug 30, 2019 at 11:48:05PM +0200, Rainer Dorsch wrote:
> Hi Roberto,
> 
> just saw that your Dovecot update failed on my jessie system:
> 
This is concerning.

> root@netcup:~# apt-get -f install
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> Correcting dependencies... Done
> The following extra packages will be installed:
>   dovecot-core dovecot-imapd dovecot-managesieved
> Suggested packages:
>   dovecot-gssapi dovecot-pgsql dovecot-mysql dovecot-sqlite dovecot-ldap 
> dovecot-pop3d dovecot-lmtpd dovecot-solr
> The following packages will be upgraded:
>   dovecot-core dovecot-imapd dovecot-managesieved
> 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 4 not fully installed or removed.
> Need to get 0 B/3,884 kB of archives.
> After this operation, 0 B of additional disk space will be used.
> Do you want to continue? [Y/n] 
> Retrieving bug reports... Done
> Parsing Found/Fixed information... Done
> Reading changelogs... Done
> (Reading database ... 93995 files and directories currently installed.)
> Preparing to unpack .../dovecot-imapd_1%3a2.2.13-12~deb8u7_amd64.deb ...

At this point the new packages have been downloaded and the system is
preparing to unpack the new version.

> Job for dovecot.service canceled.
> invoke-rc.d: initscript dovecot, action "stop" failed.
> dpkg: warning: subprocess old pre-removal script returned error exit status 1

What happened here is that the pre-removal script of the prior version
was called.  Here is what that script contains:

#!/bin/sh
set -e

if [ -x "/etc/init.d/dovecot" ]; then
        if [ -x /usr/sbin/invoke-rc.d ] ; then
                invoke-rc.d dovecot stop
        else
                /etc/init.d/dovecot stop
        fi
fi

All it tries to do is stop dovecot.  However, that fails.

> dpkg: trying script from the new package instead ...

Sometimes a package ends up in the archive with a broken maintainer
script, so the system will call the same script from the new package in
case that fixes the problem.

> Job for dovecot.service canceled.
> invoke-rc.d: initscript dovecot, action "stop" failed.

That script (which is identical, as my update did not touch the
maintainer scripts) also failed to stop dovecot.

> dpkg: error processing archive /var/cache/apt/archives/dovecot-
> imapd_1%3a2.2.13-12~deb8u7_amd64.deb (--unpack):
>  subprocess new pre-removal script returned error exit status 1

Of course, things will just keep failing since with each package it
tries to stop dovecot.

> Preparing to unpack .../dovecot-managesieved_1%3a2.2.13-12~deb8u7_amd64.deb 
> ...
> Job for dovecot.service canceled.
> invoke-rc.d: initscript dovecot, action "stop" failed.
> dpkg: warning: subprocess old pre-removal script returned error exit status 1
> dpkg: trying script from the new package instead ...
> Job for dovecot.service canceled.
> invoke-rc.d: initscript dovecot, action "stop" failed.
> dpkg: error processing archive /var/cache/apt/archives/dovecot-
> managesieved_1%3a2.2.13-12~deb8u7_amd64.deb (--unpack):
>  subprocess new pre-removal script returned error exit status 1
> Preparing to unpack .../dovecot-core_1%3a2.2.13-12~deb8u7_amd64.deb ...
> Job for dovecot.service canceled.
> invoke-rc.d: initscript dovecot, action "stop" failed.
> dpkg: warning: subprocess old pre-removal script returned error exit status 1
> dpkg: trying script from the new package instead ...
> Warning: Stopping dovecot.service, but it can still be activated by:
>   dovecot.socket
> dpkg: ... it looks like that went OK

I'm not really sure what this means.  I would have expected another
failure like the others.

> Unpacking dovecot-core (1:2.2.13-12~deb8u7) over (1:2.2.13-12~deb8u6) ...
> Processing triggers for systemd (215-17+deb8u13) ...
> Processing triggers for man-db (2.7.0.2-5) ...
> Errors were encountered while processing:
>  /var/cache/apt/archives/dovecot-imapd_1%3a2.2.13-12~deb8u7_amd64.deb
>  /var/cache/apt/archives/dovecot-managesieved_1%3a2.2.13-12~deb8u7_amd64.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> root@netcup:~# df
> Filesystem     1K-blocks     Used Available Use% Mounted on
> udev               10240        0     10240   0% /dev
> tmpfs             203900    21964    181936  11% /run
> /dev/vda2       55884132 50992956   2029304  97% /
> tmpfs             509748        0    509748   0% /dev/shm
> tmpfs               5120        0      5120   0% /run/lock
> tmpfs             509748        0    509748   0% /sys/fs/cgroup
> tmpfs             101952        0    101952   0% /run/user/2809
> root@netcup:~# systemctl status dovecot
> ● dovecot.service - Dovecot IMAP/POP3 email server
>    Loaded: loaded (/lib/systemd/system/dovecot.service; enabled)
>    Active: active (running) since Fri 2019-08-30 23:42:26 CEST; 3min 16s ago
>  Main PID: 1802 (dovecot)

The service has only been up for a few minutes, but the upgrade failed
to stop it, which makes me think it would not have such a recent start
time.  Was there something else going on with this machine?

This all seems very unusual.

Regards,

-Roberto
-- 
Roberto C. Sánchez


Reply to: