Page 2 of 3
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 11:03 am
by markharrison
eloyd wrote:
Try this and post the results:
Hi eloyd,
Here is the output:-
[root@rlwusit02 ~]# grep -r "Listen" /etc/httpd/conf*
/etc/httpd/conf/httpd.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or
/etc/httpd/conf/httpd.conf:# Change this to Listen on specific IP addresses as shown below to
/etc/httpd/conf/httpd.conf:#Listen 12.34.56.78:80
/etc/httpd/conf/httpd.conf:Listen 80
[root@rlwusit02 ~]# [root@rlwusit02 ~]#
Listen 12.34.56.78:80
This isn't the IP of my server. Should I change this line?
I understand what you are saying and agree but I have no firewall. If I just use the IP address within the URL I still get a timeout. If you scan the server it shows that port 80 is not present?
Starting Nmap 6.47 (
http://nmap.org ) at 2016-09-07 17:00 BST
Nmap scan report for rlwusit02
Host is up (0.00076s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 9.17 seconds
mark@rlwdeb030283:~$
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 11:05 am
by markharrison
tgriep wrote:Try opening up a browser on a PC and try and connect to the server using the example below.
Replace xxx.xxx.xxx.xxx with the IP address or resolvable DNS name.
It should prompt you to enter in the username and password to login in.
Try that and let me know.
The 401 error from the first post is showing that that Nagios is running on the server and that it is expecting login credentials.
Hi tgriep,
No nothing.... it times out with FQDN or IP address.
Even though httpd service is running a nmap scan doesn't see the service.
Starting Nmap 6.47 (
http://nmap.org ) at 2016-09-07 17:00 BST
Nmap scan report for rlwusit02
Host is up (0.00076s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 9.17 seconds
mark@rlwdeb030283:~$
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 11:08 am
by rkennedy
It sounds like there is a firewall between the client machine and the Nagios machine then. From the Nagios machine, can you verify apache is running? netstat -anp | grep 80
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 11:22 am
by markharrison
rkennedy wrote:It sounds like there is a firewall between the client machine and the Nagios machine then. From the Nagios machine, can you verify apache is running? netstat -anp | grep 80
Hi, Sorry it say command not found...
[root@rlwusit02 ~]# netstat -anp | grep 80
-bash: netstat: command not found
Sorry I a bit of a n00b with RHEL. Tried yum install netstat but says package not found.
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 11:29 am
by eloyd
At this point, I guarantee that you have a firewall or the name of the machine that you are trying to use to connect to your Nagios server is not resolving properly. Can you post the actual URL to your Nagios server? Remember that this will be public, for the entire world to see (thanks to Google) so if not, I understand. I'm assuming it's something like
http://nagios.mydomain.com/nagios. I'm willing to bet that either there is a firewall between your PC and nagios.mydomain.com, or nagios.mydomain.com does not resolve to an IP address.
Can you do this from your PC:
Code: Select all
Start a command prompt or linux shell or whatever you need to do to get to a place where you can type a command.
Type:
nslookup nagios.mydomain.com
If my second guess is correct, then it will return something like "can't find nagios.mydomain.com"
If it does return a proper IP address, then you have a firewall. I _really really guarantee that there's a firewall_ in that case
.
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 11:59 am
by markharrison
eloyd wrote:At this point, I guarantee that you have a firewall or the name of the machine that you are trying to use to connect to your Nagios server is not resolving properly. Can you post the actual URL to your Nagios server? Remember that this will be public, for the entire world to see (thanks to Google) so if not, I understand. I'm assuming it's something like
http://nagios.mydomain.com/nagios. I'm willing to bet that either there is a firewall between your PC and nagios.mydomain.com, or nagios.mydomain.com does not resolve to an IP address.
Can you do this from your PC:
Code: Select all
Start a command prompt or linux shell or whatever you need to do to get to a place where you can type a command.
Type:
nslookup nagios.mydomain.com
If my second guess is correct, then it will return something like "can't find nagios.mydomain.com"
If it does return a proper IP address, then you have a firewall. I _really really guarantee that there's a firewall_ in that case
.
Hi eloyd,
Thanks again for your continuing help. You must be getting bored of this by now.
OK. This is interesting? It resolves but to two servers with the same address......
mark@rlwdeb030283:~$ nslookup rlwusit02.xxx.com
Server: MyDNS Server
Address: MyDNS Server IP#53
rlwusit02.xxx.com canonical name = rlwmspib02.xxx.com.
Name: rlwmspib02.xxx.com
Address: xxx.xxx.135.62
However.... it doesn't work in the browser if I use the IP. I would expect it to shouldn't I?
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 12:04 pm
by eloyd
As long as it resolves to the IP that you are expecting for your Nagios server, that's fine.
Which leads us to....FIYAH-WALL!!!!
Seriously, you may not think there is a firewall, but I'll bet you a free beer at Nagios Conference 2017 that there is one. Or a transparent proxy that's intercepting all port 80 requests or something.
Here's a trick.
Go to your Nagios server and edit /etc/httpd/conf/httpd.conf.
Change the "Listen 80" line to "Listen 81"
Then "service httpd restart" to restart apache.
Now try going to
http://nagios.mydomain.com:81/nagios and see if that works.
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 12:21 pm
by markharrison
OK, file changed to 'listen 81' (I had to use vi for that, thanks

lol)
Didn't work for FQDN or IP Address .....
This site can’t be reached
rlwusit02.xxx.com took too long to respond.
Search Google for tsit02 nagios
ERR_CONNECTION_TIMED_OUT
I have tried the same on a windows server browser next to it in the same subnet and get the same result. *cries*
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 12:26 pm
by eloyd
Put it back to 80 and try to find someone who knows your network. Can you reach other web sites from the host you're trying from? In other words, can you get to other web servers from your desktop?
For fun, try this on the Nagios server:
and see.
Re: Getting started with Nagios core but no Web Page? Help!
Posted: Wed Sep 07, 2016 12:31 pm
by markharrison
[root@rlwusit02 ~]# service iptables stop
Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
[root@rlwusit02 ~]#
Still timesout.....
