Page 1 of 2
Apply configuration error after update Nagiosxi
Posted: Mon May 06, 2019 5:08 am
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
Re: Apply configuration error after update Nagiosxi
Posted: Mon May 06, 2019 9:08 am
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.
Re: Apply configuration error after update Nagiosxi
Posted: Wed May 08, 2019 12:20 pm
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.
Re: Apply configuration error after update Nagiosxi
Posted: Wed May 08, 2019 12:59 pm
by lmiltchev
Can you PM me your latest profile?
Re: Apply configuration error after update Nagiosxi
Posted: Thu May 09, 2019 10:59 am
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.
Re: Apply configuration error after update Nagiosxi
Posted: Thu May 09, 2019 12:05 pm
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?
Re: Apply configuration error after update Nagiosxi
Posted: Fri May 10, 2019 11:14 am
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
Re: Apply configuration error after update Nagiosxi
Posted: Fri May 10, 2019 12:52 pm
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.
Re: Apply configuration error after update Nagiosxi
Posted: Sat May 11, 2019 11:00 am
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.
Re: Apply configuration error after update Nagiosxi
Posted: Mon May 13, 2019 8:58 am
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!