Page 1 of 1
An error ocurred processing your request.
Posted: Tue Nov 27, 2018 7:19 am
by udaykumar
Hi Team,
We have upgraded our production server from 5.2.0 version to latest Xi version.
After upgradation we are facing issue while submitting force immediate check.
Pasting the screen shot. Request your assistance to resolve issue immediately as its production.
Re: An error ocurred processing your request.
Posted: Tue Nov 27, 2018 11:25 am
by benjaminsmith
Hello
@udaykumar,
Let's try to stop Nagios, reset the config permissions, and re-start Nagios. Please run the following commands:
Stop Nagios and reset config permissions
Code: Select all
service nagios stop
service ndo2db stop
pkill -9 nagios
/usr/local/nagiosxi/scripts/reset_config_perms.sh
Run a pre-flight check on your configuration files. Let me know if you have any configuration errors.
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Start Nagios
Code: Select all
service ndo2db start
service nagios start
If this does not resolve the issue, please take a look at your upgrade log file for any error messages:
Code: Select all
cat /usr/local/nagiosxi/tmp/upgrade.log
And send us a system profile to review:
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it to a cloud storage of your choice. You can share a link with me in a personal message.
After you upload the profile please post something in this thread to bring it up in the support queue.
Re: An error ocurred processing your request.
Posted: Tue Nov 27, 2018 12:49 pm
by udaykumar
HI Team,
when we use the below commands, force check is working properly. No warnings and errors in preflight check and in upgrade log.
{
service nagios stop
service ndo2db stop
pkill -9 nagios
/usr/local/nagiosxi/scripts/reset_config_perms.sh
Run a pre-flight check on your configuration files. Let me know if you have any configuration errors.
Code: Select all/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Start Nagios
Code: Select allservice ndo2db start
service nagios start}
But when we do some changes of any server or service in core manager and after apply configuration, if we try by submitting force check same error reflecting.
Attaching profile.
Re: An error ocurred processing your request.
Posted: Tue Nov 27, 2018 2:53 pm
by benjaminsmith
Hello
@udaykumar,
There were a few errors in your system profile. Nagios is not running, and your database log is showing crashed tables. We'll run the repair script on the database and then restart. However, first please verify that you are not running out of disk space:
If this checks out, run the repair script:
Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.sh
Restart Nagios:
Code: Select all
service ndo2db restart
service nagios restart
Before making changes in the core configuration manager, please verify that everything is running. Go to Administration and check that the System Components Status dashlet is showing green an all components.
Re: An error ocurred processing your request.
Posted: Wed Nov 28, 2018 3:57 am
by udaykumar
Hi ,
We have enough space in VM.
And after repairing database, we are getting below error.
Code: Select all
[root@Axxxxxx var]# tail -f /usr/local/nagiosxi/var/reportengine.log
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
PHP Warning: mysqli_real_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 125
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>^C
We are unable to fiind the below two files.
---> nagios.cmd , nagios.qh
[root@Axxxxxxx rw]# pwd
/usr/local/nagios/var/rw
And also in back end when we check nagios status, it is showing nagios is not running.
[root@ACxxxx rw]# /etc/init.d/nagios restart
Stopping nagios: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
done.
Starting nagios: done.
[root@Axxxxxx rw]# /etc/init.d/nagios status
nagios is not running
what ever we do changes , its not reflecting in console, Request to look asap as its production.
If need please take a screen share and fix the issue
Re: An error ocurred processing your request.
Posted: Wed Nov 28, 2018 1:41 pm
by benjaminsmith
Hi
@udaykumar,
That error message is normal after running the repair database script. Please open up your nagios.cfg in
/usr/local/nagios/etc file and change the following line
lock_file=/usr/local/nagios/var/nagios.lock
to
lock_file=/var/run/nagios.lock
Then restart Nagios once more:
Code: Select all
service nagios stop
service ndo2db stop
rm -f /usr/local/nagios/var/nagios.lock /var/run/nagios.lock
service ndo2db start
service nagios start
If this resolves the issue, please take a snapshot in your VM. It looks like the installer did not upgrade Nagios Core due to the the commented out grearman module line (#broker_module=/usr/lib64/mod_gearman/mod_gearman.o config=/etc/mod_gearman/mod_gearman_neb.conf eventhandler=no).
Once we resolve this issue, It would be best to re-run the manual installer and say no to using ModGearman. Please follow the upgrade instructions.
https://assets.nagios.com/downloads/nag ... ctions.pdf
Re: An error ocurred processing your request.
Posted: Wed Nov 28, 2018 2:30 pm
by lmiltchev
What are the permissions of the nagios.lock? Do you see a number (something written to it) when you cat it?
Depending on the location of the nagios.lock, run the commands with the correct path and show the output:
Code: Select all
ls -la /usr/local/nagios/var/nagios.lock
cat /usr/local/nagios/var/nagios.lock
or
Code: Select all
ls -la /var/run/nagios.lock
cat /var/run/nagios.lock
If the nagios.lock is owned by root, open the /etc/init.d/nagios script in a text editor, and modify it by adding the line, colored in red (about line # 196):
start)
echo -n "Starting nagios: "
check_config
if test -f $NagiosRunFile; then
NagiosPID=`head -n 1 $NagiosRunFile`
if status_nagios; then
echo "another instance of nagios is already running."
exit 0
fi
fi
su $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile"
rm -f $NagiosCommandFile
touch $NagiosRunFile
chown $NagiosUser:$NagiosGroup $NagiosRunFile
$NagiosBin -d $NagiosCfgFile
echo "done."
;;
save, exit, then try restarting nagios:
Code: Select all
service nagios restart
service nagios status
Re: An error ocurred processing your request.
Posted: Sat Dec 01, 2018 3:47 am
by udaykumar
Hi Team,
After modifying the script of /etc/init.d/nagios with below line, issue resolved.
""chown $NagiosUser:$NagiosGroup $NagiosRunFile""
Nagios is restarting well. Below Two files are forming automatically.
total 0
prw-rw---- 1 nagios nagcmd 0 Dec 1 19:05 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Dec 1 19:04 nagios.qh
And even we are able to submit force command promptly.
Thanks for help, if we face any problem in future, can we proceed with same thread.
Re: An error ocurred processing your request.
Posted: Mon Dec 03, 2018 10:24 am
by lmiltchev
I am glad your issue has been resolved!
Thanks for help, if we face any problem in future, can we proceed with same thread.
I will be closing this topic now, but you can always start a new thread and reference this one (provide a URL to it) if needed. Thank you!