Bug with two nagios services starting

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Bug with two nagios services starting

Post by rdedon »

Would this happen to be when 2 users are making changes to the same host/service or just logged in? I want to see if I can try and duplicate this if it is the former and see if it hangs up or what results I may get.

Thanks! :-)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Bug with two nagios services starting

Post by niebais »

No it would be different hosts. It happened the other day as well for no apparent reason. Nobody was working on the system on Friday and multiple instances of nagios spawned (3 instances). Is it possible that nagios is trying to detect if the Nagios daemon is up or not and it is spawning multiple copies?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Bug with two nagios services starting

Post by mguthrie »

Although what you're experience "shouldn't" be happening, it appears it is possible on a machine with lots of user activity. There is the /usr/local/nagios/var/nagios.lock file that get's created as soon as the nagios start process is called. I'll have to do some snooping around to see if it looks for the file, or the PID, or what might be happening that could still allow the two instances.
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: Bug with two nagios services starting

Post by admin »

There shouldn't be anything in the default XI install that checks to make sure Nagios is running and automatically restarts. This is by design so admins can stop Nagios Core if necessary.

The /etc/init.d/nagios init script could probably use some tweaking to ensure all nagios processes are killed off when the script is called with a "stop" or "restart" option. I'll take a stab at doing this for the next release.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Bug with two nagios services starting

Post by niebais »

As another follow up on this, the problem occurs occasionally even when only 1 person is applying changes.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Bug with two nagios services starting

Post by rdedon »

niebais wrote:As another follow up on this, the problem occurs occasionally even when only 1 person is applying changes.
now this is very interesting with it ghosting with only 1 user accessing.
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Bug with two nagios services starting

Post by mguthrie »

Our lead developer is going to do some revising on the nagios init script, which should hopefully take care of this in the next release.
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Bug with two nagios services starting

Post by niebais »

We just upgraded to the latest version of Nagios hoping it will solve the issue. However, I discovered something today before we upgraded. We had the dual nagios parent problem. One thing I had to do with the nagios process is a kill -4 on it to make it go away. A regular kill wasn't working so it might have something to do with the signals and it's not handling the kill signal properly.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Bug with two nagios services starting

Post by mguthrie »

Thanks for the update. I'll forward this along to our lead developer. He's going to try and have the init script revised for the next point release so that this isn't an issue.
User avatar
arnab.roy
Posts: 354
Joined: Sat Apr 30, 2011 10:24 am

Re: Bug with two nagios services starting

Post by arnab.roy »

Just to add to the pot...I have seen this as well.....but as we are not fully live yet..I havent chased this one up...
Locked