Apply configuration error after update Nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

Apply configuration error after update Nagiosxi

Post by progressive.nagiosXI »

Hi,

we are facing problem in applying configuration in current Nagiosxi updated version.Its fail sometimes

Note:- we are facing problem from last week after nagiosxi update.

Thanks
You do not have the required permissions to view the files attached to this post.
Last edited by progressive.nagiosXI on Thu May 09, 2019 11:37 pm, edited 1 time in total.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration error after update Nagiosxi

Post by lmiltchev »

What is the version of Nagios XI that you upgraded from? You are saying that you are facing a problem with applying configuration and showing us a screenshot of the switch wizard. Do you see the error only when you run the wizard? We haven't been able to recreate the issue in-house.

Can you actually apply configuration?
Go to the CCM > Tools > Config File Management and click on the following buttons (in the same order) - "Delete Files", "Write Configs", and "Verify Files". Show us the output after each click.
Be sure to check out our Knowledgebase for helpful articles and solutions!
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

Re: Apply configuration error after update Nagiosxi

Post by progressive.nagiosXI »

Hi,

After checking with above-given steps when apply configuration fails.

we do 3 test scenarios manually
  • [1.]doing very small changes like critical threshold change for any service from 80 to 90.
==> after apply configuration we suddenly received the error.
==> CCM > Tools > Config File Management == OK
==>but after 5 minutes without doing any change apply configuration runs successfully.
  • [2.]Deactivating server and services from monitoring
==>Apply config also fails after this.
==> CCM > Tools > Config File Management == shows changes does not write in servicegroup.cfg file and showing an error, after removing device details from the servicegroup manually apply runs successfully.
  • [3.]removing server and services from monitoring
==> same steps done as in 2 case then issue resolved.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration error after update Nagiosxi

Post by lmiltchev »

Can you PM me your latest profile?
Be sure to check out our Knowledgebase for helpful articles and solutions!
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

Re: Apply configuration error after update Nagiosxi

Post by progressive.nagiosXI »

Hi,

we are really frustrated now sitting on client site and apply config fails again and again.

sometime apply config runs after 5 minutes of failed apply.
sometimes after by manually delete,write,and verify files in config file management.

we attach some scenario with time in PDF and Profile .

we think this version of nagios doesn't write files successfully in its configuration files *.cfg most of the time
Note:-we are facing this issue from last 2 weeks after update NagiosXI.
Thanks

Moderator's Note: The profile has been removed from the public forum.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration error after update Nagiosxi

Post by lmiltchev »

It seems like you have some permissions issues - we see this in the logs:
touch: cannot touch ‘/usr/local/nagiosxi/scripts/reconfigure_nagios.lock’: Permission denied
Can you run the following commands, and show the output?

Code: Select all

ls -lad /usr/local/nagiosxi
ls -lad /usr/local/nagiosxi/scripts
ls -la /usr/local/nagiosxi/scripts
Also, the connection to the nagiosxi db failed:
PHP Fatal error: Uncaught exception 'Exception' with message 'A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.' in /usr/local/nagiosxi/html/includes/db.inc.php:322
Stack trace:
#0 /usr/local/nagiosxi/scripts/ccm_export.php(19): db_connect('nagiosxi')
#1 {main}
thrown in /usr/local/nagiosxi/html/includes/db.inc.php on line 322
Writing CCM configuration failed!\n
OUTPUT=Writing CCM configuration failed!\n
RETURNCODE=255
so let's see how many connections to the db you have at the moment:

Code: Select all

echo "show processlist;" | mysql -uroot -pnagiosxi | wc -l
echo "show variables;" | mysql -uroot -pnagiosxi | grep max_connections
Can you try removing the /usr/local/nagiosxi/scripts/reconfigure_nagios.lock file:

Code: Select all

rm -f /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
and running the reconfigure_nagios.sh script from the CLI?

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Do you see any errors in the output?
Be sure to check out our Knowledgebase for helpful articles and solutions!
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

Re: Apply configuration error after update Nagiosxi

Post by progressive.nagiosXI »

Hi ,

we got some warnings but not any error,PFA

still issue is not resolved

Apply configuration fails but when checked by configuration file management everything looks ok.

Apply configuration only 3-4 times success out of 15 times

Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration error after update Nagiosxi

Post by lmiltchev »

Apply configuration only 3-4 times success out of 15 times
This is an intermittent issue, so it is possible that have some timeout issues.

Let's check one more thing. Start a running tail on the cmdsubsys.log:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> cmd.txt
Attempt to Apply Configuration from the web interface. After the browser has returned some output to the screen, press Ctrl+C to stop the log tail, and show us the cmd.txt file that was generated in the /tmp directory by the above instructions.

What are the resource limit values that are set in the /etc/php.ini file?

Code: Select all

grep 'max_execution_time =\|max_input_time =\|max_input_vars =\|memory_limit =' /etc/php.ini
Increase your max_connections to a higher value, e.g. 1000 as described in the KB article below:

https://support.nagios.com/kb/article/n ... s-513.html

This way, we will rule out any issues related to the reaching the max_connections limit.
Be sure to check out our Knowledgebase for helpful articles and solutions!
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

Re: Apply configuration error after update Nagiosxi

Post by progressive.nagiosXI »

Thanks

Previously set to 1000.

[root@monitoring-nagiosxi ]# mysql -uroot -p** -e "show variables like 'max_connections';"
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 214

[root@monitoring-nagiosxi ]# mysql -uroot -p** -e "show variables like 'max_connections';"
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 818 |
[root@monitoring-nagiosxi ]# mysql -uroot -p**-e "show global status like 'Max_used_connections';"
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| Max_used_connections | 267 |


issue is look like resolved after increasing database connection limit to 818.
Now Apply Configuration/Everything run smoothly ,we observe this performance for next one week and then share the status.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration error after update Nagiosxi

Post by lmiltchev »

Now Apply Configuration/Everything run smoothly ,we observe this performance for next one week and then share the status.
Great! I will keep this topic open for the time being. Let us know when it is OK to lock it. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked