netstat question

zephod at cfl.rr.com zephod at cfl.rr.com
Tue Nov 13 04:19:10 UTC 2007


Answering my own question...

---- zephod at cfl.rr.com wrote: 
> The other day I decided I should get with the 21st century and learn something about Apache, PHP and the like. I downloaded the packages, started it up, pointed my browser at the local machine and, voila! I get the default page. Great! Everything is working.
> 
> Today, I try to start Apache and I get the following error:
> 
> (98)Address already in use: make_sock: could not bind to address [::]:80
> (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
> no listening sockets available, shutting down
> Unable to open logs
> 
> Hmmm... something else is using port 80. Just to verify that, I changed the Listen directive in my httpd.conf file from 80 to 81 and Apache starts OK. So, let me see what is using port 80:
> 
> # netstat -plant | grep 80
> tcp        0      0 127.0.0.1:8000              0.0.0.0:*                   LISTEN      3091/nasd           
> tcp        0      0 192.168.1.100:51869         75.180.132.46:443           ESTABLISHED 3803/epiphany       
> tcp        0      0 192.168.1.100:58782         64.154.83.64:443            ESTABLISHED 3803/epiphany       
> tcp        0      0 192.168.1.100:54960         64.154.83.64:443            ESTABLISHED 3803/epiphany       
> 
> Nothing!! OK, now I'm confused. How do I get netstat to show me who is using port 80?

Port 80 doesn't show up in the netstat output because it is not being used any more!
httpd itself was trying to use port 80 twice. I had tried to use system-config-httpd to change some settings and this created a system-config-httpd.conf file in /etc/httpd/conf.d. All the files in the conf.d directory are included by httpd.conf and so there were 2 'Listen 80' directives. This would seem to be a bug to me but it is on an FC6 system running:

# rpm -qa | grep httpd
httpd-2.2.6-1.fc6
system-config-httpd-1.4.1-1.fc6

so perhaps it is fixed now.

On to my next problem. Why can't this FC6 box see any http traffic from a Windows Vista box on my local network when it is obviously connecting to various web sites? I'm using Wireshark and yes, I have opened up the firewall. I can see ICMP traffic and other protocols from the Windows box and I can see http traffic from my FC6 box.

Steve.






More information about the fedora-list mailing list