Nagios is not able to be logged in from GUI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios is not able to be logged in from GUI

Post by amit.ahuja »

One more finding here. In the mysqld.log file, I also found 30k+ lines of errors.
Some look like below.

Code: Select all

160321 17:47:22 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:47:22 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:47:22 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:47:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:47:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:20 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:20 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:20 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:20 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
160321 17:48:46 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
Permission and user are correct as I compared with other servers.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios is not able to be logged in from GUI

Post by lmiltchev »

You can try repairing the database by running:

Code: Select all

mysqlcheck -r -f -u root -pnagiosxi --databases nagios
or

Code: Select all

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f *
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
/usr/bin/php /usr/local/nagiosxi/cron/dbmaint.php
If this doesn't work, and you still see the "Incorrect key file for table..." error in the mysqld.log, try:

Code: Select all

echo 'repair table <broken table> use_frm;' | mysql -t -u root -pnagiosxi nagios
where you substitute <broken table> with the actual table name.
Be sure to check out our Knowledgebase for helpful articles and solutions!
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios is not able to be logged in from GUI

Post by amit.ahuja »

Hi, i used the commands to repair the database. I didn't see the "Incorrect key file for table..." error in the mysqld.log anymore in recent lines. However, Nagiosxi still cannot be logged in.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios is not able to be logged in from GUI

Post by lmiltchev »

Run the following commands and show the output:

Code: Select all

service mysqld restart
service mysqld status
service postgresql restart
service postgresql status
service ndo2db restart
service ndo2db status
service nagios restart
service nagios  status
service httpd restart
sestatus
iptables -L -n | grep 80
service httpd status
What do you see when you try to log in the web interface? Can you show us a screenshot of the error that you are getting?
Be sure to check out our Knowledgebase for helpful articles and solutions!
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios is not able to be logged in from GUI

Post by amit.ahuja »

Hi, lmiltchev. Thank you very much for your help. The issue was fixed. The problem is that the ownership of some directories and files in /var/. I compared the ownership of those files with another running nagios, and changed them, and now nagiosxi web interface is running properly. :D
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios is not able to be logged in from GUI

Post by lmiltchev »

Great! I am glad your issue has been resolved! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked