- edited description
AssertException raised in handle_options
Issue #965
resolved
Hello Tildeslash,
if monit can not access the "monitrc" file an exception will be thrown.
With monit 5.27.2 or
$ monit -Ic /usr/local/etc/monitrc
AssertException: The control file '/usr/local/etc/monitrc' is not a file
raised in handle_options at src/monit.c:663
$ monit -Ic /usr/local/etc/monitrc
AssertException: The control file '/usr/local/etc/monitrc' is not readable
raised in handle_options at src/monit.c:665
monit 5.28.0
$ monit -Ic /usr/local/etc/monitrc
AssertException: The control file '/usr/local/etc/monitrc' is not a file
raised in handle_options at src/monit.c:687
$ monit -Ic /usr/local/etc/monitrc
AssertException: The control file '/usr/local/etc/monitrc' is not readable
raised in handle_options at src/monit.c:689
This is not a problem, but does not look very nice, a proper error message should be used therefore, I think.
With regards,
Lutz
p.s.
Nice to know, without a given "monitrc" file no exception will thrown.
$ monit summary
Cannot open the control file '/usr/local/etc/monitrc' -- Permission denied
$
$ monit -c /usr/local/etc/monitrc summary
AssertException: The control file '/usr/local/etc/monitrc' is not readable
raised in handle_options at src/monit.c:689
$
Comments (5)
-
reporter -
reporter - edited description
-
repo owner - changed status to resolved
Fixed Issue
#965: If you run monit CLI with custom configuration file, via the -c option, and the file cannot be read by monit, AssertException was thrown. Monit will report normal error instead of the exception now.→ <<cset 6792304b6763>>
-
reporter Thanks for the fixing.
Lutz -
reporter - changed version to 5.28.0
- Log in to comment