Tuesday, February 12, 2013

HTTPD 2.2.8 Problem

I have successfully compiled HTTPD 2.2.8 on my Cent OS 5.4 & made sim link for httpd daemon under /usr/sbin. Now I can start my httpd 2.2.8 with # service httpd start command.

I am able to start the service, But when I try to restart the httpd it's showing me below error message. To restart httpd I need to kill process everytime.

Stopping httpd:                       
                    [FAILED]
Starting httpd: (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
                                                           [FAILED]

Below is my netstat status.
# netstat -antp | grep httpd
tcp        0      0 :::80                       :::*                        LISTEN      4154/httpd 

# ps aux | grep httpd
root      4154  0.3  0.1   7524  2308 ?        Ss   12:33   0:00 /usr/sbin/httpd
daemon    4156  0.0  0.1   7660  1640 ?        S    12:33   0:00 /usr/sbin/httpd
daemon    4157  0.0  0.1   7660  1640 ?        S    12:33   0:00 /usr/sbin/httpd
daemon    4158  0.0  0.1   7660  1640 ?        S    12:33   0:00 /usr/sbin/httpd
daemon    4159  0.0  0.1   7660  1640 ?        S    12:33   0:00 /usr/sbin/httpd
daemon    4160  0.0  0.1   7660  1640 ?        S    12:33   0:00 /usr/sbin/httpd
root      4185  0.0  0.0   4000   712 pts/1    S+   12:34   0:00 grep httpd

Please suggest.......




Reply from Group Members

you change httpd default port and check.

you can edit your httpd.conf file and look for where it says
Listen:80
replace to 44.

save and exit

restart httpd service.

and check.
 

try this also

give this command

#httpd -v
out put will be (2.2.8)
#service httpd restart
out put will be ((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)
# updatedb
(for updating database of rpm)
#which httpd.pid
(which show latest httpd.pid path if not ) =====> copy this path for future
updation
#vim /etc/init.d/httpd

do change here
==============================
=====================
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-/usr/local/apache2/httpd.pid} =====> as per u r new
httpd.pid path i m

lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0

====================================================

save this and restart httpd ...

i am sure ....it work..



Your solution works thanks, Actually in new apache i.e 2.2.8 httpd.pid default path is /usr/local/apache2/log/httpd.pid (In my case). I have given this path in init script & it works.

No comments:

Post a Comment