All monit services shows status as 'Initializing' forever

Issue #1026 resolved
Tatya Kadam created an issue

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 #1 SMP Wed Dec 22 14:19:39 IST 2021 x86_64 x86_64 x86_64 GNU/Linux

Comments (15)

  1. Tatya Kadam reporter
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>

    </div> </form>

  2. Tildeslash 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/' 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.

  3. Tildeslash repo owner

    Please try to remove the startdelay option and run monit in debug mode:

    1. stop Monit
    2. run it in foreground debug mode: monit -vI

  4. Tildeslash repo owner

    it could be also related to #995 if the time on your machine jumps after the reboot … please try to upgrade monit to >= 5.29.0

  5. Tatya Kadam 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?

  6. Tildeslash 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)

  7. Tildeslash 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

  8. Tildeslash 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 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)

  9. Log in to comment