On 04/03/10 09:38, Ravi Roy wrote:
<snip>
address 0.0.0.0:80 <http://0.0.0.0:80>
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
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.