Solved

HTTPD can't use port 80, New RH7.3 install

Posted on 2002-06-03
13
531 Views
Last Modified: 2012-05-04
Installed RH7.3, minimum (no X) and can't get HTTPD (Apache) to listen to port 80! ERROR_LOG reads:

Address already in use: make_sock: could not bind to address 216.119.232.99 port 80

What is doing this?

0
Comment
Question by:victorus
13 Comments
 
LVL 4

Expert Comment

by:newmang
Comment Utility
Run netstat -a | grep 80 or netstat -a | grep http (depending on implementation) to see if there really is someone listening to port 80.

Then, as root, run lsof -i TCP:80 to find the PID and other details of the processes that are using that port.

Cheers - Gavin
0
 
LVL 3

Expert Comment

by:tibori
Comment Utility
You can also do:
"/sbin/service httpd status" to check the status of the server
AND Optionally:
/sbin/service httpd start to start apache
It sounds like you may be trying to start two instances of it.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
to complete previous comments:

   netstat -pan|egrep -i '80|http'

not shure if RH's netstat supports -p option, if not you may try:

   netstat -an|egrep -i '80|http'

0
 
LVL 4

Author Comment

by:victorus
Comment Utility
All excellent suggestions, BUT netstat lists nothing running on port 80. "/sbin/service/httpd status" says "httpd dead but subsys locked".

I was wondering if ipchains was in the way, but it doesn't look like it.

And then I was wondering if I could use something like port 3000, but then it does not respond.

The results of the netstat are as follows:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name  
tcp        0      0 0.0.0.0:1024            0.0.0.0:*               LISTEN      683/rpc.statd      
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      655/portmap        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      849/sshd            
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      923/sendmail: accep
udp        0      0 0.0.0.0:1024            0.0.0.0:*                           683/rpc.statd      
udp        0      0 0.0.0.0:111             0.0.0.0:*                           655/portmap        
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     1543   942/gpm             /dev/gpmctl
unix  8      [ ]         DGRAM                    976    629/syslogd         /dev/log
unix  2      [ ]         DGRAM                    1575   983/crond          
unix  2      [ ]         DGRAM                    1505   923/sendmail: accep
unix  2      [ ]         DGRAM                    1431   882/xinetd          
unix  2      [ ]         DGRAM                    1182   795/apmd            
unix  2      [ ]         DGRAM                    1044   683/rpc.statd      
unix  2      [ ]         DGRAM                    988    634/klogd          
0
 
LVL 4

Author Comment

by:victorus
Comment Utility
!!!! MORE !!!!
Ok, I tweaked around in the httpd.conf file and got the service to run and at least some portion of the service to listen to port 80. Now I have no errors on start up but whien I do a "netstat -pan" I see that both hpptd and portmap are using 80, instead of 111 like before! Is this normal?

And the worst part, I still can't get any browser client on a remote machine to get a response. I CAN ping to it fine. This might be a problem still in the httpd.conf and I am going to tweak around in there a bit more.
0
 
LVL 4

Author Comment

by:victorus
Comment Utility
!!! OOOPS !!!
Take that back about portmap listening to port 80. Just read the wrong line (you know wrapping text and all of that, duh!).

But I still get the message
"Cannot find server or DNS Error"
when I try to reach it with a client.

Am I in the wrong area now? Should I be in the APACHE group?

Any help appreciated,
Thanks,
Vic
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
> "Cannot find server or DNS Error"

You get this message on the client, right?
That has nothing to do with httpd, apache, httpd.conf etc.
Your client simply does not know how to resolve hostnames.

Dou you get a response in your client if you use something like:

    http://216.119.232.99/

or more simple in a shell:

   telnet 216.119.232.99 80
0
 
LVL 4

Author Comment

by:victorus
Comment Utility
!!! MORE IDEAS !!!

Since I cannot get wu-ftp to work on this machine either I am thinking that sshd is getting in the way. My secure log shows that it is listening on port 22 and receiving signal 15 and terminating.

I am new to the sshd daemon and RH7.3 says that it is supposed to take place of FTP, TELNET, and other protocols. Can you shed some light on this? If I can't use FTP then how is one supposed to communicate via WinPCs?

I know these are a lot of little questions but really, I just would like to get one thing solved that would probably relate to the rest.

Thanks for your patience,
Vic
0
 
LVL 4

Author Comment

by:victorus
Comment Utility
To: ahoffmann:
re: Dou you get a response in your client if you use something like:
http://216.119.232.99/

Right...

I DID use this form instead of a domain name. I have not set up the system for a domain as yet and was planning to use it as an IP address only server. Telnet is disabled by default on RH7.3 and I have had LOTS of security problems in the past when it was enabled.

Thanks,
Vic
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
http://216.119.232.99/ works (according to your previous comment)
So this question got a solution, IMHO.
0
 
LVL 4

Author Comment

by:victorus
Comment Utility
I will be out of the office for the remainder of the week and will be back Friday to pick up where we left off. I will check my e-mails then.

Thanks for all of your help,
Vic
0
 
LVL 4

Accepted Solution

by:
kannabis earned 50 total points
Comment Utility
Starting from version 7.1 I believe, Redhat has a built in firewall (using ipchains for some reason).  You might want to check and make sure that it's either disabled totally, or make sure that port 80 is available and not being blocked.

0
 
LVL 4

Author Comment

by:victorus
Comment Utility
B I N G 0 !!!

I disabled ipchains and all works well. I guess I am going to have to bone up on ipchains firewalling in order to configure this properly AND have a firewall.

I wish that RH would be a little clearer on new installation notes and include this little piece of information!

Thanks to all of the people that helped me with this problem.

-Vic
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now