Page 1 of 1

NagiosXI VM hanging?

Posted: Fri Feb 14, 2014 7:16 am
by John W
Hi there guys,

Apologies if this has been posted somewhere before, I have had a hunt through the forum but can't quite see the same issue I am having so thought I'd just post and try!

I have installed the Nagios XI pre-built VM (nagiosxi-2012r2.8c-64.ova) on to our virtual environment and although had a few issues getting it on the network (I did have to remove a couple of lines from ifcfg-eth0 and have posted what it currently looks like a the bottom of this post) however it seems to be up and running OK now however when I go to the IP through a web browser I get the welcome to Nagios screen but when I click the "Access Nagios XI" link that takes me to http://ipaddress/nagiosxi then the browser just opens a blank page, it doesn't look like it is stuck loading as there is the refresh option rather than stopping the page loading. I've tried it in Chrome and IE with no joy so don't think it's a browser problem.

Any thoughts/ideas would be much appreciated?

Thanks

John


ifcfg-eth0 current contents:-

DEVICE=eth0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
IPADDR=blah blah
NETMASK= blah blah
GATEWAY= blah blah
USERCTL=no

Re: NagiosXI VM hanging?

Posted: Fri Feb 14, 2014 10:47 am
by tmcdonald
This is usually caused by an improper shutdown of the VM, similar to pulling the cord on a physical server. This causes the databases to be left in an unclean state. We have a script for this:

/usr/local/nagiosxi/scripts/repairmysql.sh nagios
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql

Try that, let us know if it fixes XI.

Re: NagiosXI VM hanging?

Posted: Fri Feb 14, 2014 11:17 am
by John W
Hi there,

Thanks for the reply, unfortunately no joy. I ran both scripts, tried a restart and tried them again just to be thorough but still exactly same problem.

Re: NagiosXI VM hanging?

Posted: Fri Feb 14, 2014 11:29 am
by slansing
Lets try a couple more commands?

Code: Select all

service httpd restart

Code: Select all

service postgresql restart

Code: Select all

service nagios restart
Can you then tail the apache error log after trying to access the web UI again? Please post the results of the tail here:

Code: Select all

tail -25 /var/log/httpd/error_log

Re: NagiosXI VM hanging?

Posted: Fri Feb 14, 2014 12:11 pm
by John W
Hi Slansing,

Thanks for taking the time mate, I ran those commands and all services stopped and started no problem then ran the error output I had to cut it down though as forum said there were too many URL's!:-

[root@localhost ~]# tail -25 /var/log/httpd/error_log

[Fri Feb 14 11:40:01 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Fri Feb 14 11:40:01 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Fri Feb 14 11:40:01 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Fri Feb 14 11:40:01 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Fri Feb 14 11:40:01 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Fri Feb 14 11:40:01 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Fri Feb 14 11:52:26 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://172.16.192.175/
[Fri Feb 14 11:52:26 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://172.16.192.175/
[Fri Feb 14 11:52:26 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://172.16.192.175/
[Fri Feb 14 11:52:26 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://172.16.192.175/
[Fri Feb 14 11:52:26 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://172.16.192.175/
[Fri Feb 14 11:52:26 2014] [error] [client 172.16.207.65] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://172.16.192.175/

Re: NagiosXI VM hanging?

Posted: Fri Feb 14, 2014 12:13 pm
by slansing
Ahh! Mysqld must be hung, lets do this:

Code: Select all

service mysqld stop

Code: Select all

rm -rf /var/lib/mysql/mysql.sock

Code: Select all

service mysqld start
Then lets try to access the web interface, if you are still having issues, send us another log tail as these commands should fix that issue.

Re: NagiosXI VM hanging?

Posted: Fri Feb 14, 2014 12:32 pm
by John W
Sir you are a star, that has done it!

Thank you guys for helping me on that, am not a linux guy so would have spent a looooong time mucking about before I found that!

Very much appreciated