Recently upgraded Nagios fails to start

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brandondash
Posts: 48
Joined: Fri Jan 27, 2017 9:02 am

Recently upgraded Nagios fails to start

Post by brandondash »

Upgraded from 5.6.8 to 5.7.2.

The Nagios service fails to start.

Code: Select all

● nagios.service - Nagios Core 4.4.6
   Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-10-26 17:59:29 UTC; 14min ago
     Docs: https://www.nagios.org/documentation
  Process: 2422 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
  Process: 2227 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
  Process: 2217 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
 Main PID: 2229 (code=exited, status=1/FAILURE)

Oct 26 17:59:27 UTINHUGJnagios01st nagios[2217]: Total Errors:   0
Oct 26 17:59:27 UTINHUGJnagios01st nagios[2217]: Things look okay - No serious problems were detected during the pre-flight check
Oct 26 17:59:27 UTINHUGJnagios01st systemd[1]: Started Nagios Core 4.4.6.
Oct 26 17:59:27 UTINHUGJnagios01st nagios[2229]: Nagios 4.4.6 starting... (PID=2229)
Oct 26 17:59:27 UTINHUGJnagios01st nagios[2229]: Local time is Mon Oct 26 17:59:27 UTC 2020
Oct 26 17:59:27 UTINHUGJnagios01st nagios[2229]: LOG VERSION: 2.0
Oct 26 17:59:27 UTINHUGJnagios01st nagios[2229]: qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
Oct 26 17:59:27 UTINHUGJnagios01st systemd[1]: nagios.service: main process exited, code=exited, status=1/FAILURE
Oct 26 17:59:29 UTINHUGJnagios01st systemd[1]: Unit nagios.service entered failed state.
Oct 26 17:59:29 UTINHUGJnagios01st systemd[1]: nagios.service failed.
Going through nagios.log I found this:

Code: Select all

[1603735167] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /usr/local/nagios/bin/ndomod.o: cannot open shared object file: No such file or directory
[1603735167] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
[1603735167] Error: Module loading failed. Aborting.
I checked and that file is indeed missing.

I reverted to the 5.6.8 snapshot and it's there. Something about the upgrade process deleted the file. Is this a known issue? How do I resolve?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Recently upgraded Nagios fails to start

Post by dchurch »

To answer your question, yes, something does occur to delete that file when the upgrade happens. This is because the versions of Nagios Core and NDOUtils were bumped.

Edit your /usr/local/nagios/etc/nagios.cfg and make sure this line is commented:

Code: Select all

#broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
Make sure this line is uncommented (new broker module in 5.7.x):

Code: Select all

broker_module=/usr/local/nagios/bin/ndo.so /usr/local/nagios/etc/ndo.cfg
Then start the nagios service:

Code: Select all

service nagios restart
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked