Process is running but monit reports as Execution failed

Issue #382 resolved
Nayar Joolfoo created an issue

This happens a lot. My monit config

check process denyhosts with pidfile /var/run/denyhosts.pid
        start program = "/etc/init.d/denyhosts start"
        stop program = "/etc/init.d/denyhosts stop"

I do a # monit summary

Process 'denyhosts'                 Execution failed

# monit status

Process 'denyhosts'
  status                            Execution failed
  monitoring status                 Monitored
  pid                               23860
  parent pid                        1
  uptime                            3d 6h 2m 
  children                          0
  memory kilobytes                  9004
  memory kilobytes total            9004
  memory percent                    2.3%
  memory percent total              2.3%
  cpu percent                       0.0%
  cpu percent total                 0.0%
  data collected                    Wed, 01 Jun 2016 12:33:58

We see the PID is correct as in the .pid

root@t50:~# cat /var/run/denyhosts.pid
23860

Monit never changes to status running.

Comments (13)

  1. Tildeslash repo owner

    @hkandika the Monit 5.5.1 was released in June 2013 and is affected by this problem ... the latest (recommended) release is monit 5.23.0.

  2. hkandika

    Also, we are facing one more issue. When we power off our linux VM and on, monit sometimes shows all the services as "Not Monitored" though some are up and running.

  3. Tildeslash repo owner

    @hkandika please don't reuse the issue id for different problems - if your second problem will remain after upgrade, please either ask monit mailing list (https://lists.nongnu.org/mailman/listinfo/monit-general) or if you think there is some bug that doesn't match any known issue, please create a new issue with detailed description of the problem and configuration.

  4. hkandika

    @tildeslash Hi we are going to upgrade our monit tool now, can you please confirm 5.23.0 is still recommended version of this issue or I can see 5.25.0 also released.

    5.23.0 or 5.25.0 ?

  5. Jason Kim (Engineering - Central) Account Deactivated

    Hi @tildeslash, we are encountering this issue on monit 5.25.1. Here is the output of monit summary dbfs-fuse-daemon:

    monit 5.25.1 uptime: 6m
     service name                     status                      type
     dbfs-fuse-daemon                 execution failed            program
    

    However, the process is running. Here’s the config:

    check program dbfs-fuse-daemon with path /spark/scripts/fuse/check_dbfs_fuse_daemon.sh timeout 5 seconds
          start program = "/spark/scripts/restart_dbfs_fuse_daemon.sh"
          stop program = "/spark/scripts/fuse/kill_dbfs_fuse_daemon.sh"
          if status != 0 then restart
    

    The start script restart_dbfs_fuse_daemon.sh starts the FUSE daemon process, which creates a FUSE mount at a specified path. The stop script kill_dbfs_fuse_daemon.sh simply unmounts the FUSE mount.

    Have there been any other occurrences of this bug in a version >=5.25.1?

  6. Log in to comment