[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why are the services not started automatically on reboot?
From: |
Lutz Mader |
Subject: |
Re: Why are the services not started automatically on reboot? |
Date: |
Thu, 15 Aug 2019 21:31:54 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hello Markus,
the restart depends to your definition.
> Here the definition of the base service others depend on it
> CHECK PROCESS mqm_TBCOM MATCHING "^/opt/mqm/bin/amqzxma0 -m TBCOM -u mqm$"
> START = "/bin/bash -c '. /u01/app/bcom/settings/bash_profile;
> /bin/strmqm TBCOM'" UID mqm GID mqm
> STOP = "/bin/bash -c '. /u01/app/bcom/settings/bash_profile;
> /bin/endmqm -i TBCOM'" UID mqm GID mqm
> RESTART = "/bin/bash -c '. /u01/app/bcom/settings/bash_profile;
> /opt/mqm/bin/endmqm -p TBCOM; /opt/mqm> /bin/strmqm TBCOM'" UID mqm GID mqm
> IF NOT EXIST THEN RESTART
> IF NOT EXIST THEN EXEC "/u01/app/bcom/monit/logger.sh CRITICAL"
> IF 2 RESTARTS WITHIN 5 CYCLES THEN UNMONITOR
> IF 2 RESTARTS WITHIN 5 CYCLES THEN EXEC "/u01/app/bcom/monit/logger.sh
> FATAL"
>
> The log shows that the RESTART method gets called.
> [CEST Aug 14 22:07:14] error : 'mqm_TBCOM' process is not running
> ...
>
> For all other services which are dependent of the base service monit
> correctly calls the START method.
> Any ideas why this happens?
As long as a "restart" command is available and "if not exist then" use
"restart", the restart command will called if the service does not exists.
I prefer "if not exist for 3 cycles then start" to start an application.
The short delay of "3 cycles" is useful to prevent some tcp/ip problems.
With regards,
I check my monit logs tomorrow,
Lutz