Re: Apache/2.2.13 : Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Sat, Apr 3, 2010 at 9:55 AM, Nilesh Govindarajan <lists@xxxxxxxxxx> wrote:
On 04/03/10 09:38, Ravi Roy wrote:
<snip>


   Try using the /sbin/service command instead of this.

   Also, your httpd is self compiled or installed using yum ?

   And did you make any alterations (or created) /etc/rc.d/init.d/httpd ?


Thanks Nilesh,
I tried ;
command : sudo /sbin/service httpd restart
Error message :
Stopping httpd:                                            [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to
address 0.0.0.0:80 <http://0.0.0.0:80>

no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]
I compiled httpd server is myself on CentOS 5.4, I did not make any
alterations to /etc/rc.d/init.d/httpd.
Thanks
-RR


Check if rpm -q httpd gives some response ?

If it does, you've found the bug. There are two versions of httpd installed in your OS.

One is compiled by you and one installed by yum.

Now what is happening that, your compiled version I suppose located at /usr/local/apache2, is started somehow, whereas the yum version isn't running.

Now when you try to issue commands to apache using /etc/rc.d scripts or the service command, it will try to start apache from /usr/sbin instead of /usr/local/apache2/bin and that's why you are getting this error. Your apache (compiled) daemon is already listening on port 80, and the init script tries to bind it.

The only solution to this is you remove yum's edition using:

yum remove httpd

This _will_ remove /etc/rc.d/init.d/httpd as well.

You will have to use /usr/local/apache2/bin/apachectl to control the apache daemon.


 
 
 Thanks Nilsesh again for quick response.
 
  Command : sudo rpm -q httpd
 
   Response :
   httpd-2.2.3-31.el5.centos.4
 
yes you are right; my compiled version is installed under  /usr/local/Apache2
I will remove the compiled version and let you know the results.
Thanks again!
 
-RR

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux