Can no longer connect to the web GUI.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
phillip.boyce
Posts: 14
Joined: Sat Sep 17, 2011 9:35 am

Can no longer connect to the web GUI.

Post by phillip.boyce »

Hey guys,

My company is thinking about implementing Nagios XI for our brand new NOC. They gave me a few different options to evaluate. After some research I told them to go with Nagios. The CIO wants me to get the demo up and running before we get a license.

I'm using the VMWare install, got it up and running to the point where I could hit the web GUI and login as root, etc. I was doing some initial configuration and was very pleased. I got to the point where I wanted to install NagVis. I SSHed in, ran the script per the documentation and the packages were downloaded and installed perfectly. This is where my problem started:

I was able to hit the web GUI afterwards, I went to NagVis and wasn't seeing the initial screen I thought I should be seeing (per the video tutorial) and could see nothing but the demo maps. So, I restarted the box (shutdown -r now). I can SSH in fine to the CLI but now I can't HTTP in. I've lost the beautiful and easy-to-use web GUI. I've made sure Apache is on it and up and running. I'm pretty much a novice with Linux but know enough to be dangerous. Can someone point out what the problem may be, some things to check maybe?

Thanks!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can no longer connect to the web GUI.

Post by lmiltchev »

phillip.boyce,

Are you having issues with NagVis or you are talking about not being able to log into the Nagios XI?
Be sure to check out our Knowledgebase for helpful articles and solutions!
phillip.boyce
Posts: 14
Joined: Sat Sep 17, 2011 9:35 am

Re: Can no longer connect to the web GUI.

Post by phillip.boyce »

I can no longer get to the Nagiox web GUI.

I've stopped/restarted Apache, MySQL, restarted the server in multiple places and made sure the hostname is in all the correct places. I also created an A record in DNS for the Nagios machine. I can ping the Nagios machine all day long and it resolves fine as well. I can login via SSH so I know the machine is up and running. I have a feeling this may be an Apache issue. Any idea why something may have broken after running the NagVis installation script?

Thanks,
Phil
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Can no longer connect to the web GUI.

Post by nscott »

When you restart apache does it give you any error messages?

NagVis adds some apache configs so it may be worthwhile to see if thats the culprit. In the command line go to /etc/httpd/conf.d/ and look for the nagvis.conf

It would be best to move that to /tmp while we troubleshoot the Nagios XI install

mv nagvis.conf /tmp/

Now checkout your nagiosxi.conf

vi nagiosxi.conf

It should look exactly like this:

Code: Select all

<Directory "/usr/local/nagiosxi/html">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
#   AuthName "Nagios XI"
#   AuthType Basic
#   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
#   Require valid-user
</Directory>

Alias /nagiosxi "/usr/local/nagiosxi/html"
Another thing to check would be your iptables, perhaps they were turned on during the NagVis install, post the results of

service iptables status

/Nick
Nicholas Scott
Former Nagios employee
phillip.boyce
Posts: 14
Joined: Sat Sep 17, 2011 9:35 am

Re: Can no longer connect to the web GUI.

Post by phillip.boyce »

Nick,

Thanks for the fast reply!

When I stop and start Apache it gives me no errors (now). Initially after the NagVis install it gave me an error about a FQDN but I've taken care of that.

I moved the nagvis.conf file to /tmp as requested. After I moved it I restarted and got back to the command line. I tried hitting Nagios from a browser and still nothing. Also, I checked the nagiosxi.conf file and it looked exactly as you wanted it to. I didn't have to touch anything.

Here is the results you requested:

[root@deltanagiosxi ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:80
6 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:443
7 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination


What can I check next?

Thanks again Nick!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can no longer connect to the web GUI.

Post by lmiltchev »

phillip.boyce,

Can you elaborate a little bit more on: "I can no longer get to the Nagiox web GUI". What happens when you type in the address bar?

[url]http://<your_server_IP>/nagiosxi[/url]

What do you see? Any error messages? Can you post a screenshot?

If you suspect a firewall issue, you can temporarily stop the iptable service by running in terminal:

Code: Select all

# service iptables stop
If you have an issue with SELinux, you can run:

Code: Select all

# setenforce 0
If you think you messed up the default "nagiosadmin" user, you can run in terminal:

Code: Select all

# cat /usr/local/nagiosxi/etc/htpasswd.users
If you don't see the "nagiosadmin" user, then you can create one by running:

Code: Select all

# cd /usr/local/nagiosxi/etc
# htpasswd -c htpasswd.users nagiosadmin
<enter nagiosadmin password> 
If you can't authenticate, because you somehow changed the password, you can try running:

Code: Select all

# cd /usr/local/nagiosxi/scripts/
#  ./reset_nagiosadmin_password.php --password=<newpassword>
Substitute the "<newpassword>" with your password and try to log in again.

Let us know how it went.
Be sure to check out our Knowledgebase for helpful articles and solutions!
phillip.boyce
Posts: 14
Joined: Sat Sep 17, 2011 9:35 am

Re: Can no longer connect to the web GUI.

Post by phillip.boyce »

lmiltchev,

Thanks for all the suggestions. Here is what you requested:

I'm simply trying to hit the web GUI using the IP of the server. Before the NagVis install I was just using http://10.X.X.X and I would get the NagiosXI login page. Now I get the generic HTTP 500 Server Error page.

I do not suspect a firewall issue at all as our network engineer configured everything (network-wise) as I requested for the Nagios setup. However, I did stop the iptables service as you requested and still nothing.

I don't think it's an issue with SELinux but I went ahead and disabled it as you posted and still can't hit the site.

The "nagiosadmin" user does still exist as well as the other default accounts and the ones I created while in the GUI.

I have a feeling this is something really simple with Apache that I'm missing. I can ping the server fine, I can resolve the name fine from my desktop. I can do the same thing from home when I VPN into our network. Where can I find the error logs for Apache so I can check them out? I wasn't sure if the Nagios package put them in a different place than the default Apache install.

Any more ideas or suggestions? Any more data I can give you to help?

Thanks again.
phillip.boyce
Posts: 14
Joined: Sat Sep 17, 2011 9:35 am

Re: Can no longer connect to the web GUI.

Post by phillip.boyce »

Okay, I think I figured out what the problem is. Now if one of you would kindly tell me what to do to fix this; I'm sure as soon as you see this you'll be able to tell me what the problem is.

Everytime I try to hit the web GUI from a browser it generates this line in the Apache error_log file:

PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261900 bytes) in Unknown on line 0

What do you guys think?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can no longer connect to the web GUI.

Post by lmiltchev »

What is the memory limit set at in your php.ini file? Run this command in terminal and scroll through the file:

Code: Select all

# cat /etc/php.ini | less
You should see a line like this one (in the "Resource Limits" section):

Code: Select all

memory_limit = 128M      ; Maximum amount of memory a script may consume
Be sure to check out our Knowledgebase for helpful articles and solutions!
phillip.boyce
Posts: 14
Joined: Sat Sep 17, 2011 9:35 am

Re: Can no longer connect to the web GUI.

Post by phillip.boyce »

lmiltchev,

I adjusted that last night. I ended up removing and reinstalling mysql and php components and this has resolved the issue. Time to install nagvis.

Thanks for all your help, this issue is resolved. :)

- Phil
Locked