Configuration database locking issue?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nytstevenlu
Posts: 12
Joined: Mon Mar 10, 2014 10:34 am

Configuration database locking issue?

Post by nytstevenlu »

Hi,

I encountered this strange behavior a few times when I tried to remove a host using the nagiosql command:

First I "deleted" the services associated with the host using nagiosql_delete_service.php with the --config flag, the script output told me "14 services deleted successfully!" (there were 14 services on that host). However when I tried to delete the host using nagiosql_delete_host.php it told me "Host has dependent relationships", which should never happen *if* the delete_service script did its job. Then I ran the nagiosql_delete_service.php script again using the same argument, and it claimed "14 services deleted successfully!" again...I did that 4-5 times however the database entries remained untouched regardless of the "success" messages. And after a 5-min coffee break I tried the commands one more time and this time the services were really removed and I was finally able to remove the host.

Could there be some kind of database locking? Is this expected? And how do I troubleshoot if I see this kind of behavior again?

Thanks,
Steven
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuration database locking issue?

Post by lmiltchev »

Steven,

There is definitely something buggy here - I was able to recreate the issue for two of my hosts, but then all of a sudden it worked (not only for these two hosts, but also for a few more that I tried)... The results are not consistent with what one might expect. We will need to do some more digging into this.
Be sure to check out our Knowledgebase for helpful articles and solutions!
nytstevenlu
Posts: 12
Joined: Mon Mar 10, 2014 10:34 am

Re: Configuration database locking issue?

Post by nytstevenlu »

I did run some more tests over the weekend, and the results were also not consistent. Thanks a lot for looking into this!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuration database locking issue?

Post by lmiltchev »

It seems like this happens when the apply configuration (reconfigure_nagios.sh) hasn't been run within the last hour. Cookie files don't get updated properly. We have an internal bug report already filed in (Task ID = 2815).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked