Networking 101 - unable to connect to localhost

Issues related to configuring your network
kphill
Posts: 14
Joined: 2006/12/11 23:17:00

Re: Networking 101 - unable to connect to localhost

Post by kphill » 2007/01/19 14:32:19

Thanks for the comments that were posted overnight. I'll try to answer them all in one reply.

1. /etc/hosts does have an entry for 127.0.0.1 localhost.localdomain/localhost. That entry has always been there. I have made sure it is the first entry in the file ahead of my other hosts.

2. I do run DNS/named but not NIS/ypserv. I have tried to make sure that the "new" IP Address is entered in all the zone files.

3. Yes, I can ping both 127.0.0.1 and localhost without any packet loss.

4. Here are the results of the netstat commands:
[root@mail ~]# netstat -tnp| grep http
[root@mail ~]# netstat -tp|grep http
tcp 0 0 mail:32794 au-in-f99.google.com:http ESTABLISHED 4808/firefox-bin

So, does this mean that httpd is not listening to *any* IP Address? I have set the new IP Address in httpd.conf (71.113.222.213:80)

5. Thanks very much for the clarification of the /etc/sysconfig/network setting.

I've spoken with my ISP twice. They have assured me that: 1. the DNS servers which have been authoritative for my FQDN for several years now are still valid servers; and 2. they are not blocking anything on this IP Address. However, I have noticed that I have a very difficult time making them understand (at least the people I have spoken with) that I run my own servers and that the servers are having trouble getting out to the Internet. As I mentioned before, when I telnet my FQDN, it returns that it is trying the "old" IP Address (66.12.13.186) instead of the new one.

Thanks!

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Networking 101 - unable to connect to localhost

Post by gerald_clark » 2007/01/19 14:43:06

Non-authoritative answer:
186.13.12.66.in-addr.arpa name = mail.9-5usa.org.

Authoritative answers can be found from:
13.12.66.in-addr.arpa nameserver = otherguy.gte.net.
13.12.66.in-addr.arpa nameserver = bigguy.gte.net.
bigguy.gte.net internet address = 206.124.64.1
otherguy.gte.net internet address = 206.46.254.13

kphill
Posts: 14
Joined: 2006/12/11 23:17:00

Re: Networking 101 - unable to connect to localhost

Post by kphill » 2007/01/19 15:34:40

[quote]
gerald_clark wrote:
Non-authoritative answer:
186.13.12.66.in-addr.arpa name = mail.9-5usa.org.

Authoritative answers can be found from:
13.12.66.in-addr.arpa nameserver = otherguy.gte.net.
13.12.66.in-addr.arpa nameserver = bigguy.gte.net.
bigguy.gte.net internet address = 206.124.64.1
otherguy.gte.net internet address = 206.46.254.13[/quote]


OK, that is indicating that my ISP actually still has the FQDN bound to the old IP Address but also that my caching server is showing the old address as well (?). I *thought* I had changed the IP Address in all zone files. Is there something else I need to do on my side? I'll call my ISP again.

kphill
Posts: 14
Joined: 2006/12/11 23:17:00

Re: Networking 101 - unable to connect to localhost

Post by kphill » 2007/01/19 16:47:58

I spoke with my ISP and they do indeed still have my FQDN bound to the "old" IP Address. I *thought* they had made the switch. Of course, it is a matter of speaking to the right person or department; they didn't automatically make the switch. They are making the switch now and it should become effective in 24-48 hours. I hope it is sooner.

Meanwhile, if any of the above information I have submitted raises any flags with anyone I would appreciate feedback on how to correct any perceived problems in my networking.

Thanks again. I'll report back when I can find out if the ISP has gotten the change effected.

pjwelsh
Posts: 2629
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: Networking 101 - unable to connect to localhost

Post by pjwelsh » 2007/01/19 17:15:49

If the "netstat -tnp|grep httpd" did NOT produce one or more lines (I added the "d" in httpd to avoid your surfing results), the httpd is *NOT RUNNING*! You do not seem to have a running httpd listening on ANY TCP port.

kphill
Posts: 14
Joined: 2006/12/11 23:17:00

Re: Networking 101 - unable to connect to localhost

Post by kphill » 2007/01/19 17:25:21

[quote]
pjwelsh wrote:
If the "netstat -tnp|grep httpd" did NOT produce one or more lines (I added the "d" in httpd to avoid your surfing results), the httpd is *NOT RUNNING*! You do not seem to have a running httpd listening on ANY TCP port.[/quote]


Hmmmm, I can understand that but I have restarted httpd several times. It shows to be running in the System Settings/Server Settings/Services display. What else can I do or should I look for?

foxb
Posts: 1927
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

Re: Networking 101 - unable to connect to localhost

Post by foxb » 2007/01/19 17:32:42

[quote]
kphill wrote:
[quote]
pjwelsh wrote:
If the "netstat -tnp|grep httpd" did NOT produce one or more lines (I added the "d" in httpd to avoid your surfing results), the httpd is *NOT RUNNING*! You do not seem to have a running httpd listening on ANY TCP port.[/quote]


Hmmmm, I can understand that but I have restarted httpd several times. It shows to be running in the System Settings/Server Settings/Services display. What else can I do or should I look for?[/quote]

Do not trust to GUI...

Use /etc/init.d/httpd status

and check /var/log/httpd/.... logs

pjwelsh
Posts: 2629
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: Networking 101 - unable to connect to localhost

Post by pjwelsh » 2007/01/19 17:32:45

run:
[quote]ps -ef|grep httpd[/quote]
does something like this show up?
root 4047 1 0 2006 ? 00:00:01 /usr/sbin/httpd
apache 4283 4047 0 Jan17 ? 00:00:47 /usr/sbin/httpd
apache 26365 4047 0 Jan17 ? 00:00:44 /usr/sbin/httpd
apache 9436 4047 0 07:19 ? 00:00:09 /usr/sbin/httpd
apache 13701 4047 0 07:33 ? 00:00:10 /usr/sbin/httpd
apache 31322 4047 0 07:56 ? 00:00:07 /usr/sbin/httpd
apache 31280 4047 0 09:14 ? 00:00:05 /usr/sbin/httpd
apache 20966 4047 0 11:05 ? 00:00:00 /usr/sbin/httpd

Your count of "/usr/sbin/httpd" will vary.

kphill
Posts: 14
Joined: 2006/12/11 23:17:00

Re: Networking 101 - unable to connect to localhost

Post by kphill » 2007/01/19 17:55:48

[quote]
pjwelsh wrote:
run:
[quote]ps -ef|grep httpd[/quote]
does something like this show up?
root 4047 1 0 2006 ? 00:00:01 /usr/sbin/httpd
apache 4283 4047 0 Jan17 ? 00:00:47 /usr/sbin/httpd
apache 26365 4047 0 Jan17 ? 00:00:44 /usr/sbin/httpd
apache 9436 4047 0 07:19 ? 00:00:09 /usr/sbin/httpd
apache 13701 4047 0 07:33 ? 00:00:10 /usr/sbin/httpd
apache 31322 4047 0 07:56 ? 00:00:07 /usr/sbin/httpd
apache 31280 4047 0 09:14 ? 00:00:05 /usr/sbin/httpd
apache 20966 4047 0 11:05 ? 00:00:00 /usr/sbin/httpd

Your count of "/usr/sbin/httpd" will vary.[/quote]

Here's what I'm getting:
[root@mail ~]# /etc/init.d/httpd status
httpd (pid 5162 5161 5160 5159 5158 5157 5156 5155 5152) is running...

[root@mail ~]# ps -ef|grep httpd
root 5152 1 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5155 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5156 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5157 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5158 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5159 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5160 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5161 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
apache 5162 5152 0 11:19 ? 00:00:00 /usr/sbin/httpd
root 5863 5828 0 11:51 pts/1 00:00:00 grep httpd

The last few lines in the /var/log/httpd/access_log has this:
71.113.214.153 - - [17/Jan/2007:19:54:08 -0600] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
71.113.253.64 - - [18/Jan/2007:02:15:53 -0600] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
69.205.152.235 - - [18/Jan/2007:11:35:30 -0600] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
71.113.253.64 - - [19/Jan/2007:10:42:05 -0600] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"

pjwelsh
Posts: 2629
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: Networking 101 - unable to connect to localhost

Post by pjwelsh » 2007/01/19 18:32:48

Now I'm *REALY* confusedish... The netstat command with the "t" option gives TCP ports of the program "p" running. Just to make sure that something wierd with netstat is going on, run:
[quote]netstat -tnp[/quote]
This should produce a few lines of programs running on TCP ports. If that works, then httpd is *NOT* listening on network ports and the access_log is giving sprurious info.
You could also take a more broad approach with netstat and look for all "a" via:
[quote]netstat -anp|grep httpd[/quote]
(now that I think about it, I have had the "-t" option not 100% work -- like with "netstat -tnp|grep sshd" not giving sshd)
Please do something like:
[quote]tail -30 /var/log/httpd/error_log[/quote]
I don't know how many other httpd.conf or conf.d/* file changes you have made, but I would look to go back to some basic install version of those and start over...

Post Reply

Return to “CentOS 4 - Networking Support”