Blank web interface

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Fenos
Posts: 13
Joined: Wed Jul 16, 2014 2:25 am

Re: Blank web interface

Post by Fenos »

I can ping the vserver. I set IP staticly again. Here is the content of this nagios.conf:

Code: Select all

ScriptAlias /nasgios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride None
Order allow, deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/shere"
<Directory "/usr/local/nagios/shere">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Blank web interface

Post by abrist »

You will need to make sure that the XI "program url" is set to the new static ip. From you PM it sounds like you are having db connection issues. Is mysqld starting?

Code: Select all

service mysqld status
service mysqld restart
tail -25 /var/log/mysqld.log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Fenos
Posts: 13
Joined: Wed Jul 16, 2014 2:25 am

Re: Blank web interface

Post by Fenos »

Ok I checked myslqd is running, it's restarting and comming up again, but in that file there is something like that:

Code: Select all

[ERROR] /usr/libexec/mysqld: Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired
I tried to open that file, and it's jibberish inside. I tried to open it with "vi". Any advice?
Fenos
Posts: 13
Joined: Wed Jul 16, 2014 2:25 am

Re: Blank web interface

Post by Fenos »

Ok I googled it and used script to repair my sqld:

Code: Select all

service mysqld stop

Code: Select all

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

Code: Select all

service mysqld start
After that in that previous file I recived normal notifications:

Code: Select all

mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
InnoDB: Initializing buffer pool, size = 8.0M
InnoDB: Completed initialization of buffer pool
InnoDB: Started; log sequence number 0 44233
[Note] Event Scheduler: Loaded 0 events
[Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
After all that, I restarted network and httpd:

Code: Select all

/etc/init.d/network restart

Code: Select all

/etc/init.d/httpd restart
Something strange is going on. I set my IP on 'static' on "10.10.3.144" and I can ping that adress form nagios. I'm using vSphere and nagios is working there beside other Virtual Machines. What is strange, while nagios working I can't ping that specific adress from Windows lvl.

Additionally my

Code: Select all

/var/log/httpd/access_log
only shows a continuous stream of

Code: Select all

localhost.localdomain - - [28/Jul/2014:14:32:02 -0400] "POST /nagiosxi/backend/ HTTP/1.1" 200 809 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
Have you got some suggestions?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Blank web interface

Post by lmiltchev »

What IP address do you see when you run "ifconfig" in the terminal? Do you see "10.10.3.144"? Disable selinux and stop temporarily iptables for testing purposes:

Code: Select all

setenforce 0
service iptables stop
Start a running tail on the apache error log:

Code: Select all

tail -f /var/log/httpd/error_log
then type "http://<ip address>/nagiosxi" in the browsers address bar and hit "Enter". If you still see a blank page, go back to the terminal, stop the tail (Ctrl+c), and copy/paste the output of the tail.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fenos
Posts: 13
Joined: Wed Jul 16, 2014 2:25 am

Re: Blank web interface

Post by Fenos »

Yes, I can see my ping after using ifconfig. Selinux was disabled from the begining. Output of httpd error_log:

Code: Select all

[date][warn]RSA server certificate CommonName (CN) '10.10.3.169' does not match server name!?
[date][notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Blank web interface

Post by sreinhardt »

The server certificate warning can be ignored, but I see two big issues here.

1) ifcfg-eth0 is using dhcp, I thought we were using a static address?

Code: Select all

BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:0c:29:b3:41:2b
USERCTL=no
IPV6INIT=no
DNS2=10.10.3.10
DNS1=10.10.3.5
PEERDNS=yes
Should probably be:
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:0c:29:b3:41:2b
USERCTL=no
IPV6INIT=no
IPADDR=10.10.3.144 # provided this is the IP you intend to use
NETMASK=255.255.255.0 # provided this is your netmask
GATEWAY=10.10.3.1 # provided this is your gateway
DNS2=10.10.3.10
DNS1=10.10.3.5
PEERDNS=yes

2) Apache's nagios config has the path wrong. You have:

Code: Select all

Alias /nagios "/usr/local/nagios/shere"
<Directory "/usr/local/nagios/shere">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
It should be:

Code: Select all

Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
Just a change from /usr/local/nagios/shere to /share. This will reference the correct nagios core paths.

As for other issues I see throughout this thread:
Something strange is going on. I set my IP on 'static' on "10.10.3.144" and I can ping that adress form nagios. I'm using vSphere and nagios is working there beside other Virtual Machines. What is strange, while nagios working I can't ping that specific adress from Windows lvl.
You changed your workstation or the nagios systems IP? When booting from DHCP, what is the ip of the nagios system? Can you access either http://nagiosip/nagios or http://nagiosip/nagiosxi?
Output of httpd error_log:
Is this all that the log file put out while you attempted to access the web interface? Try again with the access log this time so we can make sure the server is actually getting the requests.

tail -f /var/log/httpd/access_log
[request nagios or nagiosxi web interface]
ctrl+c to cancel the tail, and post the output for us.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Fenos
Posts: 13
Joined: Wed Jul 16, 2014 2:25 am

Re: Blank web interface

Post by Fenos »

Yes, cfg-eth0 is exactly as you posted. I think I know what is the problem. We have some tricky configured web and router is not passing me through. We have to rebuild network in the office a bit, when we do that I will post my progres.
Fenos
Posts: 13
Joined: Wed Jul 16, 2014 2:25 am

Re: Blank web interface

Post by Fenos »

Ok problem solved, I had to reroute IP.

But I have another problem, I have nagios on VM as you know and It's only accessable through my domain let's say: example.pl and only through port 5555.

I can get to welcome website of nagios, but when I try to "access Nagios" it sends me through http://<ipadress>.... and it's not loading.
I have to change this. Can you tell me how?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Blank web interface

Post by sreinhardt »

Are you having these issues externally, such that when you are at home or out of the office it tries to redirect you to an internal office IP address? If so you need to set the external url in Admin->Manage System Config, and make sure that it uses the correct external name. If this is happening internally to your office as well, then you have issues with routing to the nagios system. You may still have to change the internal or external urls, to point to a firewall device and specific port that you workstation uses to access the nagios system.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked