An error ocurred processing your request.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
udaykumar
Posts: 66
Joined: Thu Jan 11, 2018 12:55 am

An error ocurred processing your request.

Post 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.
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: An error ocurred processing your request.

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
udaykumar
Posts: 66
Joined: Thu Jan 11, 2018 12:55 am

Re: An error ocurred processing your request.

Post 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.
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: An error ocurred processing your request.

Post 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:

Code: Select all

df -h
df -i
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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
udaykumar
Posts: 66
Joined: Thu Jan 11, 2018 12:55 am

Re: An error ocurred processing your request.

Post 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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: An error ocurred processing your request.

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: An error ocurred processing your request.

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
udaykumar
Posts: 66
Joined: Thu Jan 11, 2018 12:55 am

Re: An error ocurred processing your request.

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: An error ocurred processing your request.

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked