monit does not handle zombie process in log file.

Issue #855 new
Former user created an issue

Hello

I use monit 5.8.1 I have rules for process and check process status via monit.log

 check process my_process with pidfile /var/run/my_process.pid
   mode manual
   if 1 restarts within 3 cycles then exec "/bin/bash -c '/usr/libexec/monit-restart.sh my_process 0'"
# For all processes that demand a board restart, do a board restart in case they create zombies
check file superd with path /var/log/superd.log
   mode manual
   if match "'my_process' process with pid [0-9]{1,8} is a zombie" then \
exec "/bin/bash -c '/usr/libexec/monit-restart.sh my_process 1'"

So in case monit print "'my_process' process with pid 12345 is a zombie" it should run second rule and execute "/usr/libexec/monit-restart.sh my_process 1" and it is. But some times it is not.

I got "err 'my_process' process with pid 2867 is a zombie" in monit.log and monit debug prints: *2019-08-05T11:57:59.098+00:00 debug ------------------------------------------------------------------------------- 2019-08-05T11:57:59.098+00:00 debug /usr/bin/monit() [0x41ac58] 2019-08-05T11:57:59.100+00:00 debug /usr/bin/monit(LogError+0xa0) [0x41b3a0] 2019-08-05T11:57:59.100+00:00 debug /usr/bin/monit(Event_post+0x220) [0x4178e0] 2019-08-05T11:57:59.100+00:00 debug /usr/bin/monit(check_process+0x462) [0x429972] 2019-08-05T11:57:59.100+00:00 debug /usr/bin/monit(validate+0x24e) [0x42944e] 2019-08-05T11:57:59.100+00:00 debug /usr/bin/monit(main+0x461) [0x40c161] 2019-08-05T11:57:59.102+00:00 debug /lib64/libc.so.6(__libc_start_main+0xf5) [0x3c28221865] 2019-08-05T11:57:59.102+00:00 debug /usr/bin/monit() [0x40c451] 2019-08-05T11:57:59.102+00:00 debug ------------------------------------------------------------------------------- * and nothing happening. Monit continue print "err 'my_process' process with pid 2867 is a zombie" and no reboot.

Also looks like check of file is good before: 2019-08-05T11:57:57.977+00:00 debug 'superd' file exists check succeeded 2019-08-05T11:57:57.977+00:00 debug 'superd' is a regular file or socket and after issue: 2019-08-05T11:57:59.720+00:00 debug 'superd' file exists check succeeded 2019-08-05T11:57:59.722+00:00 debug 'superd' is a regular file or socket

I have tried to install new version but faced with some internal problems. Could you please help my with this issue?

Best regards, Alexey.

Comments (0)

  1. Log in to comment