- attached monit.log
All monit services shows status as 'Initializing' forever
Once I upgrade my monit to the 5.26.0 version, all services monitored by monit stay in the ‘initializing’ state forever.
This happen on system reboot.
Please find attached the config (monitOrg) for reference.
Same config is used with monit 5.25.1 and it was working fine.
uname -a : Linux centos7-rshinde1 3.10.0-1160.41.1.el7.pw.1.x86_64 SMP Wed Dec 22 14:19:39 IST 2021 x86_64 x86_64 x86_64 GNU/Linux#1
Comments (15)
-
reporter -
reporter - attached monitStatus.png
<div class="preview-container wiki-content"><!-- loaded via ajax --></div> <div class="mask"></div> </div>
</div> </form>
-
reporter - marked as critical
-
repo owner Your configuration pauses the monit start for 2 minutes (see the startdelay option) => it’ll stay in the initialization mode ca. for two minutes.
For some reason your log shows, that monit was reload almost immediately after the start delay passed:
[GMT Jan 21 08:37:36] debug : pidfile '/run/monit.pid' does not exist [GMT Jan 21 08:37:36] info : Starting Monit 5.26.0 daemon with http interface at [localhost]:2812 [GMT Jan 21 08:37:36] info : Monit will delay for 240s on first start after reboot ... [GMT Jan 21 08:40:56] debug : Starting Monit HTTP server at [localhost]:2812 [GMT Jan 21 08:40:56] debug : Monit HTTP server started [GMT Jan 21 08:40:56] info : 'centos7-rsaini1' Monit 5.26.0 started ... [GMT Jan 21 08:40:56] info : Reinitializing Monit -- control file '/etc/monitrc' [GMT Jan 21 08:40:56] debug : Shutting down Monit HTTP server
This seems to be issue with the installation or the environment (how you start Monit) - not Monit itself.
-
repo owner Please try to remove the startdelay option and run monit in debug mode:
- stop Monit
- run it in foreground debug mode: monit -vI
-
reporter - edited description
- attached monitrcOrg
-
repo owner it could be also related to
#995if the time on your machine jumps after the reboot … please try to upgrade monit to >= 5.29.0 -
reporter No there is no time jump after reboot on my machine.
Below is my scenario:
- On system bootup, we start monit with a delay of 240s.
-
Before 240s delay is complete we put config change in /etc/monitrc & does the ‘monit reload’
-
So with this ‘monit reload’ we are facing an ‘initializing’ state issue with monit 5.26.0
If we remove ‘monit reload’ (after modification in /etc/monitrc), then found monit take new config without reload and also ‘initializing’ state issue also not seen.
-
-
Note: When monit is up and monitoring services, that time I made changes in /etc/monitrc and I found monit starts using new config without reloading.
Did monit 5.26.0 version take config on the fly without reloading? In which version this change come in?
-
repo owner - marked as minor
-
repo owner I’m unable to reproduce the problem: testing with the development version (5.31.0), but monit >= 5.29.0 should work the same.
Please upgrade monit (it’s not worth to loose time debugging 5.26.0)
-
reporter Why reload happened after start only, and why things went into a bad state. related to https://bitbucket.org/tildeslash/monit/issues/699/monit-reload-does-not-completely-register?
Do we need to reload now or not?
-
repo owner as mentioned - i’m not going to loose time with 5.26.0 as i’m unable to reproduce the problem with 5.30.0
-
repo owner - changed status to resolved
Fixed: Issue
#1026: If Monit is reloaded during the start delay, do not wait for the delay to pass and reload the configuration immediately.→ <<cset 778a32adfbd3>>
-
repo owner As mentioned i wasn’t able to reproduce your issue with 5.30.0, so it’s most likely fixed already, but one problem was present though: the configuration reload received during the start delay didn’t interrupt the delay and monit did one test cycle before reloading the configuration.
The https://bitbucket.org/tildeslash/monit/commits/778a32adfbd3 makes monit reload the configuration immediately … when the start delay passed, the first validation cycle will run with the new configuration instead of the old one.
If you want to test it, you can check the code out from Bitbucket, the fix will be part of next release (5.31.0)
-
reporter Thanks !!!
- Log in to comment
</div> </form>