Page 1 of 1
Apply config Error Code 225
Posted: Thu Feb 13, 2025 10:57 am
by gregbeyer
When I attempt apply config, getting:
There was an error while attempting to apply configuration. Error code: 255.
Error: Cannot open main configuration file '/usr/local/nagios/etc/nagios.cfg' for reading!
Checked permissions on the file:
-rw-rw-r-- 1 apache nagios 7816 Feb 13 08:34 /usr/local/nagios/etc/nagios.cfg
This is the same permissions on all of the other files in /usr/local/nagios/etc/
Re: Apply config Error Code 225
Posted: Thu Feb 13, 2025 4:51 pm
by jmichaelson
Hi Greg. Those permissions look correct. Out of curiosity what are the permissions on /usr/local/nagios/etc (I'd expect 775 with apache:nagios as the owner and group). Also, which distro are you running?
Re: Apply config Error Code 225
Posted: Fri Feb 14, 2025 10:18 am
by gregbeyer
Hi Jmichaelson,
/usr/local/nagios/etc :
drwxrwxr-x. 8 apache nagios 4096 Feb 13 08:34 etc
We're running RHEL 9.4, and NagiosXI 2024R1.3
Re: Apply config Error Code 225
Posted: Fri Feb 14, 2025 4:27 pm
by gwesterman
Did you change or do something that caused this to start happening (e.g. an upgrade)? Or does it appear to have begun happening out of the blue?
Re: Apply config Error Code 225
Posted: Fri Feb 14, 2025 4:40 pm
by jmichaelson
Hmmm. That looks correct as well. It looks like opening the file as a memory mapped file is failing. Alas
https://github.com/NagiosEnterprises/na ... red.c#L214 shows that there are plenty of reasons why it could be failing in your case. If you're comfortable doing it, you may want to use the logit call shown in
https://github.com/NagiosEnterprises/na ... fig.c#L108, sprinkled liberally in the shared.c function definition of mmap_fopen to log which spot is failing, to better triage what's going on with it. Compile it, install it, check the logs, etc.
Re: Apply config Error Code 225
Posted: Fri Feb 14, 2025 5:02 pm
by gregbeyer
This is a dev-nagios box, isn't much used except to test changes before doing on prod. Attempted to rollback a configuration snapshot, and apply config, and this happened, so basically out of the blue. No changes other than a check to be applied, no upgrade attempted.
I will try the logit you suggest, Jason.