Address already in use: make_sock: could not bind to address - Apache - HTTPD Error
So I was getting the following error on one of my servers.
Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs!
The fix is as follows. Run the following command
netstat -lnp | grep '0.0.0.0:80'
# output
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 30982/crond
In my case the output showed that crond was using the port. I ran the following to learn more
ps 30982
PID TTY STAT TIME COMMAND
30982 ? S 0:34 crond
I tried the following a couple of times
service crond stop
and then
service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
and later
service crond start
Starting crond: [ OK ]
Everything started working. Hopefully it will work for you too (I'm not responsible if something breaks on your server).
computer web+server linux
24 Comments:
i was getting much the same error for port 443. Recently-installed SELinux seems to be at fault.
I had the same problem starting an apache server. After using the netstat command to identify the process, I just kill -9'd it and apache started right up. Thanks for posting this!
For me, the netstat didn't output anything. I tried to stop any process that might be using ports but in the end it got a bit unwieldy, so I simply rebooted my box and *phew* Apache worked fine after the boot. I have no clue what caused the "Address already in use".
thanks a ton for this post. My problem was a skype process blocking the port. No idea how I would have solved it without this post.
Thanks a lot, this helped
A perl script blocked the port..what script-i need to find out
I had the same problem, although not caused by crond. But the netstat tip really helped me to identify what was going on.
thanks for this post. My problem was apache process blocking the port. No idea how I would have solved it without this post.
Thanks a lot! In my case it turned out that apache-perl was hogging the port from before and now I have fixed it.
Glad you posted this one
wena onda! si me funciono,pero en el grep '0.0.0.0:80', lo busque solo con ':80' ya que no me retornaba nada en la salida...
En mi caso habia editado el archivo httpd.conf, y por error coloque otra directiva como esta:
Listen 80
por lo tanto habian dos, esa era la razon del error
Thank you VERY MUCH!
Man, you solved my problem:
"netstat -a -n -b"
- figured out that Skype was listening to 80.
Than I could start Apache:
"\Apache2\bin>Apache.exe -k install"
- install as a service
Best reagards!
Alexander Salnikov
Skype: "sal-alex"
Hi,
You tip helped me. Thank a lot!
this post is glorious, a reminder of using netstat was all i needed, for me IIS was running, must have gotten reenabled after my program files directory got wiped
Thanks Frank, your tip worked for me. In my case apache was using that port but would not stop untill i used your tip.
in my case I have get this
netstat -lnp | grep '0.0.0.0:80'
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6495/skype
I stoped the skype and run the following
service httpd start
Its working fine thanks for help
THANKS BIG TIME! spent three hours fixing this issue, then i found your blog.
thanks for the post, i thought i wont able to finish my project.. i just type netstat and rebooted my computer and WHALAAA!!! everything is back to normal. tnx men ^^
Thanks works great for me, but in my case the php was taking the port, if anyone can help why that happening will be very helpfully! my mail is chactuchac10@yahoo.com.ar
Good post = Made me look like a Linux Guru.
Thanks
thanks a lot you solved my prob!!!!
Adrián
Same problem on Windows, and turned out it was Skype too. From command prompt, NETSTAT -ao | find /i "listening" This showed a process attached to [machinename]:http , and after reading other comments on this page just guessed it was Skype. Shut down Skype and Apache service started.
Really a very helpful post. i had the same problem,Surgemail was running on the port 80.
I simply stop the sergemail and it worked fine...
thanks for the post
Nripendra
In Solaris, I tried netstat and could see port 80 bound but no descritpion of the process was given.
Solved the problem by
svcadm disable httpd
check netstat -na | grep .80 | more
svcadm enable httpd
Hope it helps to Solaris 10 uses.
Beautiful..Crisply written. Helped me solve my problem! Thanks a lot!
Post a Comment
<< Home