Apache 2 : Address in use
I have apache 2.0.55 installed on mandriva 2006.
when i run './apachectl start' I get this error:
(98)Address already in use: make_sock: could not bind to address 192.168.1.101:8080
no listening sockets available, shutting down.
Unable to open logs
so 192.168.1.102 is the specific machine running the server, 8080 is the port, using 80 gives me the same error. also, i tried: 'service httpd restart' this looks successful saying all is [OK], but gets me nowhere. any help would be great. thanks in advance.
netstat -lnp | grep :80
This command should return the name of the running program that hsa port 80 or 8080 open as well as it's process ID. Then you will at least know what is bound to those ports.
You don't by chance have both apache 1.3 and apache 2.x installed on your machine do you ? possibly apache 1.3 is running and that why apache2 can't start..
You can also look to the running processess to see if you see apache, apache2, or httpd running
ps -aux | grep httpd
ps -aux | grep apache
maybe try the following to check versions..
First trick is to find out what is bound to those ports so you can move forward..
alright, ran netstat -lnp | grep :80
tcp 0 0.0.0.0:80 0.0.0.0:* LISTEN 4766/httpd
soooo, what the hell does that mean? httpd is listening on 0.0.0.0? is httpd the same as apache?
thanks again for the help!
Generally yes, although there are other httpd programs httpd is the Apache2 program. You could do a ps aux and look for process 4766 to see exactly what it is, or just kill it.
alright, i ran ps -aux, i found 4766, it said /usr/sbin was the command. i killed it and it freed up a load of processes that were "apache2". in the clear now right? nope. i ran 'apachectl start' but i get a similar error:
(99)Cannot assign requested address: make_sock: could not bind to address to 192.168.1.101:80
no listening sockets available, shutting down
Unabke to open logs
crap? ;) thanks for the help so far,
Pyre, I'm having the same problem, except my box is not showing any other process using that port or IP.
What are the lines in your httpd.conf file for the following:
It used to work fine locally for me when I specified a host name in the Listen part, but remote machines would get nothing back. But as soon as I replaced the host.domain.com with an IP address, apache started barfing when I try to start it. This is the configuration that worked locally for me:
|All times are GMT -5. The time now is 10:51 PM.|