Control: tags -1 + moreinfo
On Fri, Nov 19, 2021 at 01:55:09PM +0100, Michael Hatzold wrote:
>
> * What led up to the situation?
> apt dist-upgrade
> * What exactly did you do (or not do) that was effective (or
> ineffective)?
> apt dist-upgrade
> * What was the outcome of this action?
> distupgrade went through, but when restaring the necceccary systemd.services
> all went wel except fpr dovecot.service.
> This is a long-standing bug. imap wont work after dist-upgrade unless you
> reboot or you manually execute:
I am not able to reproduce this on an upgrade from a basic bullseye
installation to bookworm. Prior to the upgrade I have:
admin@ip-10-0-0-111:~$ systemctl status dovecot.service
● dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor
preset: enabled)
Active: active (running) since Fri 2021-11-19 17:20:00 UTC; 1min 12s ago
Docs: man:dovecot(1)
http://wiki2.dovecot.org/
Main PID: 593 (dovecot)
Tasks: 4 (limit: 4444)
Memory: 5.0M
CPU: 32ms
CGroup: /system.slice/dovecot.service
├─593 /usr/sbin/dovecot -F
├─606 dovecot/anvil
├─607 dovecot/log
└─609 dovecot/config
Nov 19 17:20:00 ip-10-0-0-111 systemd[1]: Starting Dovecot IMAP/POP3 email
server...
Nov 19 17:20:00 ip-10-0-0-111 dovecot[593]: master: Dovecot v2.3.13 (89f716dc2)
starting up for imap (core dumps disabled)
Nov 19 17:20:00 ip-10-0-0-111 systemd[1]: Started Dovecot IMAP/POP3 email
server.
admin@ip-10-0-0-111:~$ dpkg -l | grep dovecot
ii dovecot-core 1:2.3.13+dfsg1-2 amd64
secure POP3/IMAP server - core files
ii dovecot-imapd 1:2.3.13+dfsg1-2 amd64
secure POP3/IMAP server - IMAP daemon
ii dovecot-sieve 1:2.3.13+dfsg1-2 amd64
secure POP3/IMAP server - Sieve filters support
admin@ip-10-0-0-111:~$ sudo sed -i 's,bullseye,bookworm,' /etc/apt/sources.list
admin@ip-10-0-0-111:~$ sudo apt update
admin@ip-10-0-0-111:~$ sudo apt -y dist-upgrade
...
Setting up dovecot-core (1:2.3.16+dfsg1-3) ...
Replacing config file /etc/dovecot/dovecot.conf with new version
Replacing config file /etc/dovecot/dovecot-dict-sql.conf.ext with new version
Replacing config file /etc/dovecot/conf.d/10-logging.conf with new version
Replacing config file /etc/dovecot/conf.d/10-ssl.conf with new version
dovecot.socket is a disabled or a static unit not running, not starting it.
...
Setting up dovecot-imapd (1:2.3.16+dfsg1-3) ...
...
Setting up dovecot-sieve (1:2.3.16+dfsg1-3) ...
...
Processing triggers for dovecot-core (1:2.3.16+dfsg1-3) ...
During this process, I had an IMAP (mutt) client connected, and it
received a disconnect due to the server shutting down for restart during
the trigger processing. After that the client was able to reconnect
with no additional work on the server to make this possible.
systemctl on the server showed the following after the upgrade and
client reconnect:
admin@ip-10-0-0-111:~$ systemctl status dovecot.service
● dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor
preset: enabled)
Active: active (running) since Fri 2021-11-19 17:27:03 UTC; 5min ago
Docs: man:dovecot(1)
https://doc.dovecot.org/
Main PID: 24660 (dovecot)
Status: "v2.3.16 (7e2e900c1a) running"
Tasks: 7 (limit: 4444)
Memory: 5.3M
CPU: 43ms
CGroup: /system.slice/dovecot.service
├─24660 /usr/sbin/dovecot -F
├─24661 dovecot/anvil
├─24662 dovecot/log
├─24663 dovecot/config
├─24667 dovecot/imap-login
├─24668 dovecot/stats
└─24670 dovecot/imap
Nov 19 17:27:03 ip-10-0-0-111 systemd[1]: Starting Dovecot IMAP/POP3 email
server...
Nov 19 17:27:03 ip-10-0-0-111 dovecot[24660]: master: Dovecot v2.3.16
(7e2e900c1a) starting up for imap (core dumps disabled)
Nov 19 17:27:03 ip-10-0-0-111 systemd[1]: Started Dovecot IMAP/POP3 email
server.
Nov 19 17:27:35 ip-10-0-0-111 dovecot[24662]: imap-login: Login: user=<admin>,
method=PLAIN, rip=73.140.205.249, lip=10.0.0.>
> # journalctl -xeu dovecot.service
> ░░ Subject: Resources consumed by unit runtime
> ░░ Defined-By: systemd
> ░░ Support: https://www.debian.org/support
> ░░
> ░░ The unit dovecot.service completed and consumed the indicated resources.
> Nov 15 01:15:31 neutower systemd[1]: Starting Dovecot IMAP/POP3 email
> server...
> ░░ Subject: A start job for unit dovecot.service has begun execution
> ░░ Defined-By: systemd
> ░░ Support: https://www.debian.org/support
> ░░
> ░░ A start job for unit dovecot.service has begun execution.
> ░░
> ░░ The job identifier is 4759.
> Nov 15 01:15:31 neutower dovecot[162036]: Error: bind(192.168.2.13, 143)
> failed: Cannot assign requested address
> Nov 15 01:15:31 neutower dovecot[162036]: Error: service(imap-login):
> listen(192.168.2.13, 143) failed: Cannot assign request>
> Nov 15 01:15:31 neutower dovecot[162036]: master: Error: bind(192.168.2.13,
> 143) failed: Cannot assign requested address
> Nov 15 01:15:31 neutower dovecot[162036]: master: Error: service(imap-login):
> listen(192.168.2.13, 143) failed: Cannot assign>
> Nov 15 01:15:31 neutower dovecot[162036]: master: Fatal: Failed to start
> listeners
> Nov 15 01:15:31 neutower dovecot[162036]: Fatal: Failed to start listeners
> Nov 15 01:15:31 neutower systemd[1]: dovecot.service: Main process exited,
> code=exited, status=89/n/a
> ░░ Subject: Unit process exited
This indicates that we did try to restart dovecot on your system, but
that it didn't start because something else was bound to port 143. It
would be interesting to know what that is. Wsa it the old dovecot
process that didn't shut down for some reason? Was it systemd? (Can you
show the output of `systemctl status dovecot.socket`?)
Those logs only show what happened when dovecot tried to start. It would
be interesting to see earlier logs corresponding with dovecot attempting
to shut down during the 'restart' operation.
Does `systemctl restart dovecot.service` work for you generally (outside
the context of an apt operation)?
noah