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/
Apply config Error Code 225
- jmichaelson
- Posts: 383
- Joined: Wed Aug 23, 2023 1:02 pm
Re: Apply config Error Code 225
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?
Please let us know if you have any other questions or concerns.
-Jason
-Jason
Re: Apply config Error Code 225
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
/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
-
gwesterman
- Posts: 269
- Joined: Wed Aug 23, 2023 11:29 am
Re: Apply config Error Code 225
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?
- jmichaelson
- Posts: 383
- Joined: Wed Aug 23, 2023 1:02 pm
Re: Apply config Error Code 225
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.
Please let us know if you have any other questions or concerns.
-Jason
-Jason
Re: Apply config Error Code 225
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.
I will try the logit you suggest, Jason.