AssertException raised in Command_new

Issue #932 resolved
Lutz Mader created an issue

Hello Tildeslash,
all the time I try to test a monit config with some unavailable scripts I get a "AssertException" raised in Command_new at "src/system/Command.c:436" (based on Monit 5.27.0).

A "AssertException" raised for this config file.

check program myscript with path "/usr/local/bin/myscript.sh"
  if status != 0 then alert

% monit -t -c test.cfg; echo $?
/Users/lutz/monit/config/test.cfg:1: Program does not exist: '/usr/local/bin/myscript.sh'
/Users/lutz/monit/config/test.cfg:1: Program does not exist: '/usr/local/bin/myscript.sh'
AssertException: File '/usr/local/bin/myscript.sh' does not exist
 raised in Command_new at src/system/Command.c:436
1

But a "Program does not exist" for this config file.

check process apache with pidfile /usr/local/apache/logs/httpd.pid
  start program "/usr/local/bin/myscript.sh start"
  stop program "/usr/local/bin/myscript.sh stop"

% monit -t  -c test.cfg; echo $?
/Users/lutz/monit/config/test.cfg:7: Program does not exist: '/usr/local/bin/myscript.sh'
/Users/lutz/monit/config/test.cfg:8: Program does not exist: '/usr/local/bin/myscript.sh'
Control file syntax OK
0

Is this a problem in the parser,
from my point of view the config test should not end with a AssertException.
A similar behavior to the second sample seems to me a better solution.

With regards,
Lutz

p.s.

I got the AssertException with 5.26.0, 5.27.0 on MacOS, Linux, AIX.

Comments (3)

  1. Lutz Mader reporter

    Thanks for your fast help,
    I will never understand how to use the *.y files, I thing.

    With regards,
    Lutz

  2. Log in to comment