Wednesday, August 5, 2009

apache restart error - Starting httpd: (98)Address already in use

[root@]# /etc/init.d/httpd start
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]

For resolving this issue grep list of open files and kill that file
[root@]# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
perl 7448 apache 4u IPv6 33113387 TCP *:http (LISTEN)

[root@]# kill -9 7448

[root@]# /etc/init.d/httpd start
Starting httpd: [ OK ]