Both “tellmail shutdown” and "/etc/init.d/surgemail stop” finish quickly. The init.d/surgemail method takes a little longer because the script has a 9 second delay at the end to give the SurgeMail process some time to stop cleanly.
I see the same problem on a new Centos 7 installation, so it is not unique to Ubuntu. With Centos, the system shutdown process waits 5 minutes for surgemail to shutdown before giving up. I always see the “unclean “ message in SurgeMail status after rebooting, unless I manually stop SurgeMail before shutting down the system.
--
John Wilkes
john@wilkes.com
My life has been a series of tragedies and
triumphs, but I wouldn’t have it any other way.
> On Mar 9, 2018, at 12:44 AM, Chris Ferebee <cf@ferebee.net> wrote:
>
> John,
>
> when Ubuntu shuts down, it will send all processes a TERM signal, i. e., politely asking them to quit. After a certain length of time, it will send any remaining processes a KILL signal, forcing them to quit. If you kill -KILL SurgeMail, that’s an unclean shutdown.
>
> Presumably, SurgeMail is taking a long time to shut down, perhaps ChrisP has some ideas about that, or maybe it just has a lot on its plate? When you run
>
> # tellmail shutdown
>
> how long does it take until all SurgeMail processes exit?
>
> I don’t use Ubuntu myself, but I the shutdown is controlled by systemd, and I understand that if you set the line
>
> DefaultTimeoutStopSec=
>
> in /etc/systemd/system.conf to a higher value (e. g. 240), that will give processes more time to shutdown before they are killed. The default is 90 seconds AFAIK.
>
> Best,
> Chris
>
>
>> Am 09.03.2018 um 04:35 schrieb John Wilkes <john@wilkes.com>:
>>
>> I’ve been running 7.3c3-3 on Ubuntu 16.04. When I reboot the system I always see an error message on the SurgeMail status page:
>>
>> LAST SHUTDOWN WAS UNCLEAN :-) -- Examine logs crash*.log to establish cause
>>
>> The log files don’t give any hints about the problem that I can see.
>>
>> I am in the process of moving my server to a new location, and I’ve switched to Centos 7. I see the same error there on a fresh, brand new installation of SurgeMail 7.3c3-3 with no accounts and the default surgemail.ini file.
>>
>> I did a manual shutdown with "/etc/init.d/surgemail stop” and it shutdown cleanly.
>>
>> Any ideas how to get a clean automatic SurgeMail shutdown when I’m shutting down the system? Is this a known problem?
>>
>> --
>> John Wilkes
>> john@wilkes.com
>
>
|