Problem restarting Apache

8 posts / 0 new
Last post
#1 Wed, 11/16/2011 - 17:15

Problem restarting Apache

I'm having problems trying to get a script to work which uses FFMPEG and cURL and after installing FFMPEG I'm getting Starting web server: apache2(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 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. failed!

When I try to restart Apache. Any ideas? I'm also getting cURL errors in the script :/.

Edit: I completely uninstalled both ffmpeg and curl and the error is still coming up. I think it has to do with me recently adding a site using a dedicated IP.

Thu, 11/17/2011 - 05:06

Search this line in your httpd.conf or apache2.conf NameVirtualHost *:80 and comment it then restart apache.

Thu, 11/17/2011 - 08:19

Where should I find the httpd.conf? I found one in /etc/apache2/ but it was completely blank.

Thu, 11/17/2011 - 09:17

The error you're getting suggests that an Apache process isn't completely shutting down during the Apache restart.

I don't think it's related to curl or ffmpeg, and it's also unlikely to be related to moving to a new IP. My guess is that some application or Apache module is causing the issue.

To get around that issue you're seeing, you can kill the Apache process manually. You can do that with this command:

killall apache2

And then start Apache again:

/etc/init.d/apache2 start

Thu, 11/17/2011 - 13:55

I've been having this issue even after rebooting the system and trying a restart. Should I have to kill everything every time I have to restart Apache? Also along with FFMPEG and cURL I installed their php5 packages as well.

Thu, 11/17/2011 - 14:05


It sounded like you're using Debian/Ubuntu there... if that's true, what does this command output:

ls /etc/apache2/mods-enabled/

Thu, 11/17/2011 - 14:14

Yes I am using Debian, that command gives:

root@srv:~# ls /etc/apache2/mods-enabled/ actions.conf cgi.load mime.conf reqtimeout.conf actions.load dav_fs.conf mime.load reqtimeout.load alias.conf dav_fs.load negotiation.conf rewrite.load alias.load dav.load negotiation.load ruby.load auth_basic.load dav_svn.conf php5.conf setenvif.conf auth_digest.load dav_svn.load php5.load setenvif.load authn_file.load deflate.conf proxy_balancer.conf ssl.conf authz_default.load deflate.load proxy_balancer.load ssl.load authz_groupfile.load dir.conf proxy.conf status.conf authz_host.load dir.load proxy_connect.load status.load authz_user.load env.load proxy_http.load suexec.load autoindex.conf fcgid.conf proxy.load autoindex.load fcgid.load python.load root@srv:~#

Also the killall command did not work, Apache still could not restart and gave the same error.

Thu, 11/17/2011 - 14:30

This is in my Apache2.conf: NameVirtualHost NameVirtualHost NameVirtualHost NameVirtualHost

Should I try commenting it out like that guy above said? Another problem I'm having is sometimes when I reboot my virtual networks just stop working (site doesn't load, IP won't ping) and I have to readd them all just to get it to work. Maybe this is related?

Edit: It seems to work when I do service apache2 stop then service apache2 start :/. Still looking for a solution for the IPs not coming up too.