Page 1 of 2

Stuck at the start

Posted: Thu Mar 23, 2017 12:16 pm
by acovi006
I just stood up a virtual machine with centos 7. I installed Nagios core on it and everything completed successfully, but I am unable to access to the web portal. Please assist. I know we have allowed port 80 already.

Re: Stuck at the start

Posted: Thu Mar 23, 2017 1:44 pm
by avandemore
Please run the following and show the output:

Code: Select all

# yum install -y -q net-tools
# netstat -plnt
# iptables -L

Re: Stuck at the start

Posted: Thu Mar 23, 2017 2:30 pm
by acovi006
Attached is the error file.

Re: Stuck at the start

Posted: Thu Mar 23, 2017 2:31 pm
by acovi006
Here is the output:
[root@localhost ~]# yum install -y -q net-tools
Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
[root@localhost ~]# netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 967/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1682/master
tcp6 0 0 :::80 :::* LISTEN 10624/httpd
tcp6 0 0 :::22 :::* LISTEN 967/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1682/master
[root@localhost ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
INPUT_direct all -- anywhere anywhere
INPUT_ZONES_SOURCE all -- anywhere anywhere
INPUT_ZONES all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
FORWARD_direct all -- anywhere anywhere
FORWARD_IN_ZONES_SOURCE all -- anywhere anywhere
FORWARD_IN_ZONES all -- anywhere anywhere
FORWARD_OUT_ZONES_SOURCE all -- anywhere anywhere
FORWARD_OUT_ZONES all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
OUTPUT_direct all -- anywhere anywhere

Chain FORWARD_IN_ZONES (1 references)
target prot opt source destination
FWDI_public all -- anywhere anywhere [goto]
FWDI_public all -- anywhere anywhere [goto]

Chain FORWARD_IN_ZONES_SOURCE (1 references)
target prot opt source destination

Chain FORWARD_OUT_ZONES (1 references)
target prot opt source destination
FWDO_public all -- anywhere anywhere [goto]
FWDO_public all -- anywhere anywhere [goto]

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target prot opt source destination

Chain FORWARD_direct (1 references)
target prot opt source destination

Chain FWDI_public (2 references)
target prot opt source destination
FWDI_public_log all -- anywhere anywhere
FWDI_public_deny all -- anywhere anywhere
FWDI_public_allow all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere

Chain FWDI_public_allow (1 references)
target prot opt source destination

Chain FWDI_public_deny (1 references)
target prot opt source destination

Chain FWDI_public_log (1 references)
target prot opt source destination

Chain FWDO_public (2 references)
target prot opt source destination
FWDO_public_log all -- anywhere anywhere
FWDO_public_deny all -- anywhere anywhere
FWDO_public_allow all -- anywhere anywhere

Chain FWDO_public_allow (1 references)
target prot opt source destination

Chain FWDO_public_deny (1 references)
target prot opt source destination

Chain FWDO_public_log (1 references)
target prot opt source destination

Chain INPUT_ZONES (1 references)
target prot opt source destination
IN_public all -- anywhere anywhere [goto]
IN_public all -- anywhere anywhere [goto]

Chain INPUT_ZONES_SOURCE (1 references)
target prot opt source destination

Chain INPUT_direct (1 references)
target prot opt source destination

Chain IN_public (2 references)
target prot opt source destination
IN_public_log all -- anywhere anywhere
IN_public_deny all -- anywhere anywhere
IN_public_allow all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere

Chain IN_public_allow (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ctstate NEW

Chain IN_public_deny (1 references)
target prot opt source destination

Chain IN_public_log (1 references)
target prot opt source destination

Chain OUTPUT_direct (1 references)
target prot opt source destination

Re: Stuck at the start

Posted: Thu Mar 23, 2017 2:53 pm
by avandemore
I don't see port 80 allowed. Can you try with your firewall disabled?

Re: Stuck at the start

Posted: Fri Mar 24, 2017 8:08 am
by acovi006
So I was able to disable the firewall on the Nagios server and I am still unable to access the site.

Re: Stuck at the start

Posted: Fri Mar 24, 2017 8:12 am
by acovi006
It is working now. I had to completely stop the firewall instead of disabling it on the nagios server.

Re: Stuck at the start

Posted: Fri Mar 24, 2017 9:12 am
by cdienger
Was there anything further we can help with or are we okay to close the thread?

Re: Stuck at the start

Posted: Fri Mar 24, 2017 11:15 am
by acovi006
There is one more thing....I am now getting the following after I added a windows host.

Re: Stuck at the start

Posted: Fri Mar 24, 2017 2:26 pm
by ssax
Please post the output of these commands:

Code: Select all

chage -l nagios
sestatus
grep nag /etc/group
grep "User \|Group " /etc/httpd/conf.d/nagios
service nagios status
ps aux |grep nagios.cfg
Try to restart the nagios service:

Code: Select all

service nagios restart
Then if it fails, send us the output of this command:

Code: Select all

tail -n100 /var/log/messages /usr/local/nagios/var/nagios.log
Thank you