Apache won't restart: [crit] (98)Address already in use: make_sock: could not bind to port 8090

Note this is an old guide. It was for apache 1.3 with customapache.  The current boot script we provide shouldn't have this issue.
If apache is not completely shutting down, consider trying graceful restarts (see related link below) and also ensure your system is updated such that you don't have any outdated php scripts on the server.



[crit] (98)Address already in use: make_sock: could not bind to port 8090
or
[crit] (98)Address already in use: make_sock: could not bind to port 443
or
[crit] (98)Address already in use: make_sock: could not bind to port 80

If you see this error in your /var/log/httpd/error_log, it would mean that apache isn't shutting down completely before trying to restart.  This means that the new process won't be able to bind to the given ports because they're still being used by the old copy of apache that wasn't completely shut down.

To solve this, use a different boot script that will wait for all apache processes to stop before starting the new one:

cd /usr/local/directadmin/customapache
rm -f httpd*
./build update

Once you have the new scripts downloaded, you need to install them:

RedHat:

cp httpd /etc/init.d/httpd
chmod 755 /etc/init.d/httpd
chkconfig httpd reset


FreeBSD:

cp httpd_freebsd /usr/local/etc/rc.d/httpd
chmod 755 /usr/local/etc/rc.d/httpd


Was this article helpful?

mood_bad Dislike 2
mood Like 0
visibility Views: 35594