Hi Roberto,

thanks, for the quick reply.

Am Samstag, 31. August 2019, 00:29:53 CEST schrieb Roberto C. Sánchez:
> 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
> 

root@netcup:~# test -x "/etc/init.d/dovecot"
root@netcup:~# echo $?
0
root@netcup:~# test -x /usr/sbin/invoke-rc.d
root@netcup:~# echo $?
0
root@netcup:~# invoke-rc.d dovecot stop
Job for dovecot.service canceled.
invoke-rc.d: initscript dovecot, action "stop" failed.
root@netcup:~# echo $?
1
root@netcup:~# systemctl status dovecot
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/lib/systemd/system/dovecot.service; enabled)
   Active: active (running) since Sat 2019-08-31 09:47:19 CEST; 22s ago
 Main PID: 12106 (dovecot)
   CGroup: /system.slice/dovecot.service
           ├─12106 /usr/sbin/dovecot -F
           ├─12109 dovecot/anvil
           ├─12110 dovecot/log
           ├─12111 dovecot/ssl-params
           ├─12112 dovecot/imap-login
           ├─12113 dovecot/config
           ├─12115 dovecot/auth
           └─12116 dovecot/imap

Aug 31 09:47:19 netcup systemd[1]: Starting Dovecot IMAP/POP3 email server...
Aug 31 09:47:19 netcup systemd[1]: Started Dovecot IMAP/POP3 email server.
Aug 31 09:47:21 netcup dovecot[12106]: master: Dovecot v2.2.13 starting up for 
imap, sieve (core dumps disabled)
Aug 31 09:47:21 netcup dovecot[12110]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=2a02:8070:898f:e400:1a31:bfff:fe52:1b1c, 
lip=2a03:4000:6:52b6::, mpid=12116, TLS, session=<wUjn8mSRVAAqAoBwiY/kABoxv//
+Uhsc>
root@netcup:~# /etc/init.d/dovecot stop
[....] Stopping dovecot (via systemctl): dovecot.serviceWarning: Stopping 
dovecot.service, but it can still be activated by:
  dovecot.socket
. ok 
root@netcup:~# systemctl status dovecot
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/lib/systemd/system/dovecot.service; enabled)
   Active: active (running) since Sat 2019-08-31 09:48:54 CEST; 5s ago
 Main PID: 12162 (dovecot)
   CGroup: /system.slice/dovecot.service
           ├─12162 /usr/sbin/dovecot -F
           ├─12164 dovecot/anvil
           ├─12165 dovecot/log
           ├─12166 dovecot/ssl-params
           ├─12167 dovecot/imap-login
           ├─12168 dovecot/config
           ├─12170 dovecot/auth
           ├─12171 dovecot/imap-login
           ├─12172 dovecot/imap
           └─12173 dovecot/imap

Aug 31 09:48:54 netcup systemd[1]: Started Dovecot IMAP/POP3 email server.
Aug 31 09:48:54 netcup dovecot[12162]: master: Dovecot v2.2.13 starting up for 
imap, sieve (core dumps disabled)
Aug 31 09:48:55 netcup dovecot[12165]: imap-login: Login: user=<kathrin>, 
method=PLAIN, rip=2a02:8070:898f:e400:1a31:bfff:fe52:1b1c, 
lip=2a03:4000:6:52b6::, mpid=12172, TLS, session=<PI16+GSRfAAqAoBwiY/kABoxv//
+Uhsc>
Aug 31 09:48:55 netcup dovecot[12165]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=2a02:8070:898f:e400:1a31:bfff:fe52:1b1c, 
lip=2a03:4000:6:52b6::, mpid=12173, TLS, session=<h6B6+GSRfgAqAoBwiY/kABoxv//
+Uhsc>
root@netcup:~# systemctl stop dovecot
Warning: Stopping dovecot.service, but it can still be activated by:
  dovecot.socket
root@netcup:~# systemctl status dovecot
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/lib/systemd/system/dovecot.service; enabled)
   Active: active (running) since Sat 2019-08-31 09:49:13 CEST; 6s ago
 Main PID: 12180 (dovecot)
   CGroup: /system.slice/dovecot.service
           ├─12180 /usr/sbin/dovecot -F
           ├─12182 dovecot/anvil
           ├─12183 dovecot/log
           ├─12184 dovecot/ssl-params
           ├─12185 dovecot/imap-login
           ├─12186 dovecot/config
           ├─12188 dovecot/auth
           ├─12189 dovecot/imap-login
           ├─12190 dovecot/imap
           └─12191 dovecot/imap

Aug 31 09:49:13 netcup systemd[1]: Started Dovecot IMAP/POP3 email server.
Aug 31 09:49:13 netcup dovecot[12180]: master: Dovecot v2.2.13 starting up for 
imap, sieve (core dumps disabled)
Aug 31 09:49:14 netcup dovecot[12183]: imap-login: Login: user=<kathrin>, 
method=PLAIN, rip=2a02:8070:898f:e400:1a31:bfff:fe52:1b1c, 
lip=2a03:4000:6:52b6::, mpid=12190, TLS, session=<nwGc+WSRjAAqAoBwiY/kABoxv//
+Uhsc>
Aug 31 09:49:14 netcup dovecot[12183]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=2a02:8070:898f:e400:1a31:bfff:fe52:1b1c, 
lip=2a03:4000:6:52b6::, mpid=12191, TLS, session=<nxac+WSRjgAqAoBwiY/kABoxv//
+Uhsc>
root@netcup:~# 

It almost looks to me that dovecot restarts itself (?)

Aug 31 09:49:13 netcup systemd[1]: Stopping Dovecot IMAP/POP3 email server...
Aug 31 09:49:13 netcup dovecot[12165]: anvil: Warning: Killed with signal 15 
(by pid=1 uid=0 code=kill)
Aug 31 09:49:13 netcup dovecot[12165]: auth: Error: read(anvil-auth-penalty) 
failed: EOF
Aug 31 09:49:13 netcup dovecot[12165]: auth: Error: net_connect_unix(anvil-
auth-penalty) failed: Permission denied
Aug 31 09:49:13 netcup dovecot[12165]: imap-login: Error: read(anvil) failed: 
EOF
Aug 31 09:49:13 netcup dovecot[12165]: imap-login: Error: read(anvil) failed: 
EOF
Aug 31 09:49:13 netcup dovecot[12165]: imap: Server shutting down. in=160 
out=105576
Aug 31 09:49:13 netcup dovecot[12165]: imap: Server shutting down. in=141 
out=1696
Aug 31 09:49:13 netcup systemd[1]: Stopped Dovecot IMAP/POP3 email server.
Aug 31 09:49:13 netcup systemd[1]: Starting Dovecot IMAP/POP3 email server...
Aug 31 09:49:13 netcup systemd[1]: Started Dovecot IMAP/POP3 email server.
Aug 31 09:49:13 netcup dovecot[12180]: master: Dovecot v2.2.13 starting up for 
imap, sieve (core dumps disabled)
 
> 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?

The recent start time is probably since this was the output of apt-get install 
-f, and the apt-get upgrade failed shortly before (with the same error 
message). Fortunately, I still had the entire log in the terminal history:

root@netcup:~# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  dovecot-core dovecot-imapd dovecot-lucene dovecot-managesieved dovecot-sieve 
libsvn1 subversion
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/7,198 kB of archives.
After this operation, 216 kB 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 .../subversion_1.8.10-6+deb8u7_amd64.deb ...
Unpacking subversion (1.8.10-6+deb8u7) over (1.8.10-6+deb8u6) ...
Preparing to unpack .../libsvn1_1.8.10-6+deb8u7_amd64.deb ...
Unpacking libsvn1:amd64 (1.8.10-6+deb8u7) over (1.8.10-6+deb8u6) ...
Preparing to unpack .../dovecot-imapd_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-
imapd_1%3a2.2.13-12~deb8u7_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
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-sieve_1%3a2.2.13-12~deb8u7_amd64.deb ...
Unpacking dovecot-sieve (1:2.2.13-12~deb8u7) over (1:2.2.13-12~deb8u6) ...
Preparing to unpack .../dovecot-lucene_1%3a2.2.13-12~deb8u7_amd64.deb ...
Unpacking dovecot-lucene (1:2.2.13-12~deb8u7) over (1:2.2.13-12~deb8u6) ...
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 ...
Job for dovecot.service canceled.
invoke-rc.d: initscript dovecot, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/dovecot-
core_1%3a2.2.13-12~deb8u7_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
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
 /var/cache/apt/archives/dovecot-core_1%3a2.2.13-12~deb8u7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@netcup:~# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 dovecot-lucene : Depends: dovecot-core (= 1:2.2.13-12~deb8u7) but 
1:2.2.13-12~deb8u6 is installed
 dovecot-managesieved : Depends: dovecot-sieve (= 1:2.2.13-12~deb8u6) but 
1:2.2.13-12~deb8u7 is installed
 dovecot-sieve : Depends: dovecot-core (= 1:2.2.13-12~deb8u7) but 
1:2.2.13-12~deb8u6 is installed
E: Unmet dependencies. Try using -f.
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 ...
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-
imapd_1%3a2.2.13-12~deb8u7_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
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
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)
   CGroup: /system.slice/dovecot.service
           ├─1802 /usr/sbin/dovecot -F
           ├─1805 dovecot/anvil
           ├─1806 dovecot/log
           ├─1808 dovecot/imap-login
           ├─1809 dovecot/config
           ├─1814 dovecot/imap
           ├─1844 dovecot/imap-login
           ├─1845 dovecot/imap-login
           ├─1846 dovecot/imap-login
           ├─1847 dovecot/imap-login
           ├─1848 dovecot/imap-login
           ├─1849 dovecot/imap-login
           ├─1850 dovecot/imap-login
           ├─1851 dovecot/imap
           ├─1852 dovecot/imap-login
           ├─1853 dovecot/imap-login
           ├─1854 dovecot/imap
           ├─1855 dovecot/imap-login
           ├─1856 dovecot/imap
           ├─1857 dovecot/imap
           ├─1858 dovecot/imap
           ├─1859 dovecot/imap
           ├─1860 dovecot/imap
           ├─1861 dovecot/imap
           ├─1862 dovecot/imap
           └─1863 dovecot/imap

Aug 30 23:42:26 netcup systemd[1]: Started Dovecot IMAP/POP3 email server.
Aug 30 23:42:26 netcup dovecot[1802]: master: Dovecot v2.2.13 starting up for 
imap, sieve (core dumps disabled)
Aug 30 23:42:26 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=2a02:8070:898f:e400:1a31:bfff:fe52:1b1c, 
lip=2a03:4000:6:52b6::, mpid=1814, TLS, session=<0fqMf1yR8AAqAoBwiY/kABoxv//
+Uhsc>
Aug 30 23:42:31 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1851, TLS, 
session=<M2rff1yRZQBOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1854, TLS, 
session=<vUngf1yRZgBOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1856, TLS, 
session=<9xrhf1yRhABOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1857, TLS, 
session=<nhrhf1yRTQBOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1858, TLS, 
session=<Rxrhf1yRlwBOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1859, TLS, 
session=<F+7hf1yRmQBOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1860, TLS, 
session=<MWvif1yRIgBOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1861, TLS, 
session=<uvXif1yR3ABOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1862, TLS, 
session=<eUzjf1yRyQBOKygI>
Aug 30 23:42:32 netcup dovecot[1806]: imap-login: Login: user=<rd>, 
method=PLAIN, rip=78.43.40.8, lip=37.120.169.230, mpid=1863, TLS, 
session=<fgHlf1yRJgBOKygI>
root@netcup:~#

Kind regards
Rainer


-- 
Rainer Dorsch
http://bokomoko.de/

Reply via email to