Deleted server dovecot crashed, VPS reboot required

OS: Centos 7
Webmin 1.942
Virtualmin 6.09

Virtualmin will renew a SSL certificate via Lets Encrypt but then dovecot crashes, won’t restart with “systemctl start dovecot”, and requires a system reboot.

There are also multiple entries for the same server in dovecot.conf

How can I renew certificates without a dovecot fail and required system reboot?

You appear to have been hit by a recently discovered issue - see LetsEncrypt Overwriting Root Server Keys

As far as I know, that issue only effected Virtualmin Pro installations. This is something else, though possibly related (there were other changes in cert handling from 6.08->6.09, but issue you’ve linked to only rolled out for Pro users because my build script pulled half-finished features that are planned for 6.10…the 6.09 GPL package never had that problem).

As I recall this started 4 or 5 months ago. I suspect when the upgrade from 6.08 to 6.09 occurred. Will 6.10 address this? If so, when do you expect 6.10 to be available?

6.09 was not released five months ago. It’s only been out for a couple of months (and for most users it is only a week or so old). If your problem started five months ago, it is unrelated to 6.09.

And, to be clear: It will only be fixed by 6.10 if we actually know what the problem is.

It is clearly not the same problem discussed in that other topic, and so we do not know what your problem is. I don’t know what’s causing your problem; I haven’t seen these exact symptoms described before, I don’t think (and though it’s sort of similar to the issue linked and in the same area of the code, it literally can’t possibly be the same…that specific issue was exclusive to Virtualmin Pro versions 6.09-1 and 6.09-2).

After running SSL renewal dovecot crashed and had running orphan processes which kept it from restarting. Does this help identify the problem?

What gets logged to the mail.log/maillog and/or the journal from dovecot when you try to restart the dovecot service?

You said something about “multiple entries for the same server in dovecot.conf”, can you post an example of what you’re seeing? And, if you clean it up manually (getting rid of the extra entries) does it (the problem) come back?

Let’s Encrypt Certificate
Requesting a certificate for markfernald.com, www.markfernald.com from Let’s Encrypt …
… request was successful!
Configuring webserver to use new certificate and key …
… done
Applying web server configuration …
… done

Mail Log
May 12 12:52:55 host dovecot: master: Warning: Killed with signal 15 (by pid=3379 uid=0 code=kill)
May 12 12:52:55 host dovecot: master: Fatal: Dovecot is already running with PID 1717 (read from /var/run/dovecot/master.pid)

[root@host ~]# systemctl start dovecot
Job for dovecot.service failed because the control process exited with error code. See “systemctl status dovecot.service” and “journalctl -xe” for details.

[root@host ~]# systemctl status dovecot.service
● dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-05-12 12:52:56 EDT; 7s ago
Docs: man:dovecot(1)
http://wiki2.dovecot.org/
Process: 3543 ExecStop=/usr/bin/doveadm stop (code=exited, status=75)
Process: 1684 ExecStart=/usr/sbin/dovecot (code=exited, status=0/SUCCESS)
Process: 1681 ExecStartPre=/usr/sbin/portrelease dovecot (code=exited, status=0/SUCCESS)
Process: 1647 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
Main PID: 1717 (code=exited, status=0/SUCCESS)

May 12 12:47:57 host.markfernald.com systemd[1]: Starting Dovecot IMAP/POP3 email server…
May 12 12:47:58 host.markfernald.com systemd[1]: Can’t open PID file /var/run/dovecot/master.pid (yet?) after start: No such file or directory
May 12 12:47:58 host.markfernald.com dovecot[1717]: master: Dovecot v2.2.36 (1f10bfa63) starting up for imap, pop3 (core dumps disabled)
May 12 12:47:58 host.markfernald.com systemd[1]: Started Dovecot IMAP/POP3 email server.
May 12 12:52:55 host.markfernald.com dovecot[1717]: master: Warning: Killed with signal 15 (by pid=3379 uid=0 code=kill)
May 12 12:52:56 host.markfernald.com doveadm[3543]: Fatal: Dovecot is not running (read from /var/run/dovecot/master.pid)
May 12 12:52:56 host.markfernald.com systemd[1]: dovecot.service: control process exited, code=exited status=75
May 12 12:52:56 host.markfernald.com systemd[1]: Unit dovecot.service entered failed state.
May 12 12:52:56 host.markfernald.com systemd[1]: dovecot.service failed.

I ran the command below to kill dovecot processes
[root@host ~]# for i in ps aux | grep dovecot | awk '{print $2}' ; do kill -9 $i ; done
-bash: kill: (4890) - No such process

Dovecot started but showed Process 3543 status-75 in red
● dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-05-12 12:56:24 EDT; 5s ago
Docs: man:dovecot(1)
http://wiki2.dovecot.org/
Process: 3543 ExecStop=/usr/bin/doveadm stop (code=exited, status=75)
Process: 5002 ExecStart=/usr/sbin/dovecot (code=exited, status=0/SUCCESS)
Process: 5000 ExecStartPre=/usr/sbin/portrelease dovecot (code=exited, status=0/SUCCESS)
Process: 4997 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
Main PID: 5004 (dovecot)
CGroup: /system.slice/dovecot.service
├─5004 /usr/sbin/dovecot
├─5005 dovecot/anvil
├─5006 dovecot/log
└─5008 dovecot/config

This is my 2nd server which only has one site and does not have multiple entries in dovecot.conf

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.