Dovecot cannot be started, fails with no log

feanorknd

Member
Sep 28, 2005
21
1
153
Hello:

Suddenly, dovecot failed when saving changes at "service manager" at WHM... obviously, it is checked twice, to the monitor is sending me emails continuosly.

At log /var/log/maillog, I only have this line:

Oct 28 15:24:09 hyperserver dovecot: master: Warning: Killed with signal 15 (by pid=33888 uid=0 code=kill)
Nothing else...

Tried to start the service using /scripts/restartsrv_dovecot but cannot be started, and the output (/usr/local/cpanel/logs/tailwatchd_log):

Waiting for “dovecot” to start ……
…failed.

Service Error
El servicio “dovecot” no se pudo iniciar.
The “dovecot” service failed to start.

dovecot has failed. Contact your system administrator if the service does not automagically recover.
Waiting for “dovecot” to start ……
…failed.

Service Error
El servicio “dovecot” no se pudo iniciar.
The “dovecot” service failed to start.

dovecot has failed. Contact your system administrator if the service does not automagically recover.
...etc
So:
  • checked via netstat: no port used by dovecot is being used.
  • checked via ps: no proccess dovecot is running
  • checked: /var/run/dovecot/master.pid does not exists
  • checked: no output at /var/log/maillog... no errors.
Tried also:
  • /scripts/builddovecotconf with no error: the same, dovecot does not start
Tried also executing from init.d/dovecot start but fails. The only message thrown is:

The 'dovecot' service's PID file '/var/run/dovecot/master.pid' did not appear after 10 seconds.

It seems, there is no way to reset config or force reinstalling dovecot, and this is a production server, so clients are bombing our phones...

Then, I figured out maybe if try to start dovecot binary directly through SSH terminal, some error may appear and give me a clue... but better: IF I START DOVECOT MANUALLY DOING...

/usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
THEN DOVECOT STARTS, go to the background and nothing else.... now it is running...

But if proccess launched manually gets killed, somehow or when I even make some changes via "service manager", the same problem.

  • restartsrv_dovecot cannot start it
  • init.d/dovecot cannot start it
  • tailwatchd cannot start it

This way.... what could I do?

It is WHM 11.52.0 (build 18) with last CSF installed. No problem at similar neighbour servers at all...

Output from "service manager" when modifying...

p0f stopped successfully.
Waiting for “dovecot” to restart ………[2015-10-28 17:25:03 +0100] warn [restartsrv_dovecot] The 'dovecot' service's PID file '/var/run/dovecot/master.pid' did not appear after 10 seconds. at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 1094. Cpanel::ServiceManager::Base::is_up_via_pidfile(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 760 Cpanel::ServiceManager::Base::start(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Services/Dovecot.pm line 52 Cpanel::ServiceManager::Services::Dovecot::start(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 688 Cpanel::ServiceManager::Base::restart(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30), "graceful", undef) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 528 Cpanel::ServiceManager::Base::run_from_argv(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30), "--verbose", "--html", "--wait", "--verbose") called at /usr/local/cpanel/scripts/restartsrv_dovecot line 48 main::__ANON__() called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71 Try::Tiny::try(CODE(0xba2de8), Try::Tiny::Catch=REF(0xc1dd30)) called at /usr/local/cpanel/scripts/restartsrv_dovecot line 67 …[2015-10-28 17:25:19 +0100] warn [restartsrv_dovecot] The 'dovecot' service's PID file '/var/run/dovecot/master.pid' did not appear after 10 seconds. at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 1094. Cpanel::ServiceManager::Base::is_up_via_pidfile(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 760 Cpanel::ServiceManager::Base::start(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Services/Dovecot.pm line 52 Cpanel::ServiceManager::Services::Dovecot::start(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 688 Cpanel::ServiceManager::Base::restart(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30), "graceful", undef) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 528 Cpanel::ServiceManager::Base::run_from_argv(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30), "--verbose", "--html", "--wait", "--verbose") called at /usr/local/cpanel/scripts/restartsrv_dovecot line 48 main::__ANON__() called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71 Try::Tiny::try(CODE(0xba2de8), Try::Tiny::Catch=REF(0xc1dd30)) called at /usr/local/cpanel/scripts/restartsrv_dovecot line 67 [2015-10-28 17:25:24 +0100] info [restartsrv_dovecot] Domming remaining dovecot processes …[2015-10-28 17:25:35 +0100] warn [restartsrv_dovecot] The 'dovecot' service's PID file '/var/run/dovecot/master.pid' did not appear after 10 seconds. at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 1094. Cpanel::ServiceManager::Base::is_up_via_pidfile(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 760 Cpanel::ServiceManager::Base::start(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Services/Dovecot.pm line 52 Cpanel::ServiceManager::Services::Dovecot::start(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30)) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 688 Cpanel::ServiceManager::Base::restart(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30), "graceful", undef) called at /usr/local/cpanel/Cpanel/ServiceManager/Base.pm line 528 Cpanel::ServiceManager::Base::run_from_argv(Cpanel::ServiceManager::Services::Dovecot=HASH(0xbbdc30), "--verbose", "--html", "--wait", "--verbose") called at /usr/local/cpanel/scripts/restartsrv_dovecot line 48 main::__ANON__() called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71 Try::Tiny::try(CODE(0xba2de8), Try::Tiny::Catch=REF(0xc1dd30)) called at /usr/local/cpanel/scripts/restartsrv_dovecot line 67
…failed.

Service Error
El servicio “dovecot” no se pudo iniciar.
The “dovecot” service failed to start.

Log Messages
Oct 28 17:24:50 hyperserver dovecot: log: Warning: Killed with signal 15 (by pid=49067 uid=0 code=kill)
Oct 28 17:24:50 hyperserver dovecot: pop3([email protected]): Disconnected: Logged out top=0/0, retr=0/0, del=0/48, size=12629125, bytes=24/1653
Oct 28 17:24:49 hyperserver dovecot: imap([email protected]): Server shutting down. in=3740, out=33083, bytes=3740/33083

dovecot has failed. Contact your system administrator if the service does not automagically recover.
Waiting for “tailwatchd” to restart ………waiting for “tailwatchd” to initialize ……
…finished.
 

feanorknd

Member
Sep 28, 2005
21
1
153
Hello...

Answer my self for some other people in my case...

First of all, cpanel support was excellent... they fixed they """issue""". 13 hours for first answer, but very well done... happy with them :-D

The problem was:
  • I have had a screen session, running something like "tail -f /var/log/mailllog | grep dovecot"
And that is all... we could consider this is half the problem, because really, I think the other half is:
  • Cpanel scripts does review "ps" proccesses to find out if dovecot already running. But they do this bad, really bad, because that "grep dovecot" running, make cpanel scripts believe that there is running dovecot instance and try to kill it... because it is not really dovecot (but grep), as dovecot were dead, really dead, the cpanel scripts finish without starting dovecot at all.
Seriously? Yes.

You can test: put any kind of proccess using "dovecot" as parameter, and cpanel scripts are not able to restart or start dovecot.

I think cpanel guys may fix their scripts to filter a bit better.... "grep dovecot" is not Dovecot daemon at all.

Regards.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

I am happy to see the issue is now resolved. To note, internal case FB-99361 was opened to address this issue in the past, and it's no longer reproducible on cPanel version 11.52.

Thank you.