monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: failing to stop a service means giving up on starting?


From: address@hidden
Subject: Re: failing to stop a service means giving up on starting?
Date: Sat, 6 Jan 2018 22:52:02 +0100

Hello,

if the stop method failed, it's not clear if it's safe to run the start method 
(the service is in kind of undefined state).

You can add a standalone restart method that will override the default 
stop+start sequence (the restart method can be better prepared for such 
exceptions then stop+start):

        check process redis ...
                start method = "/etc/init.d/redis-server start"
                stop method = "/etc/init.d/redis-server stop"
                restart method = "/etc/init.d/redis-server restart"


Best regards,
Martin



> On 4 Jan 2018, at 14:45, SZÉPE Viktor <address@hidden> wrote:
> 
> Hello!
> 
> Why there is no "start" attempt for 'redis' after the failed stop?
> 
> [UTC Jan  4 12:35:11] error    : 'redis' failed protocol test [REDIS] at 
> [localhost]:6379 [TCP/IP] -- Connection refused
> [UTC Jan  4 12:35:12] info     : 'redis' trying to restart
> [UTC Jan  4 12:35:12] info     : 'redis' stop: '/etc/init.d/redis-server stop'
> [UTC Jan  4 12:35:42] error    : 'redis' failed to stop (exit status -1) -- 
> '/etc/init.d/redis-server stop': Program timed out -- Stopping redis-server:
> 
> [UTC Jan  4 12:37:37] error    : 'redis_test' status failed (1) -- no output
> [UTC Jan  4 12:37:37] info     : 'olm2.olm.hu' swap usage check succeeded 
> [current swap usage=6.3%]
> [UTC Jan  4 12:37:37] info     : 'olm2.olm.hu' mem usage check succeeded 
> [current mem usage=7.0%]
> 
> [UTC Jan  4 12:39:32] error    : 'redis_test' status failed (1) -- no output
> 
> I'd like monit to keep on trying.
> Please advise.
> 
> 
> SZÉPE Viktor, honlap üzemeltetés
> https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
> -- 
> +36-20-4242498  address@hidden  skype: szepe.viktor
> Budapest, III. kerület
> 
> 
> 
> 
> 
> -- 
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]