(98)Address already in use: make_sock: could not bind to address [::]:80


#1

I got this error output when trying to install the certificate:

"Error while running apachectl graceful.
httpd not running, trying to start

(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:443
no listening sockets available, shutting down
Unable to open logs

Rolling back to previous server configuration…
Error while running apachectl graceful.
httpd not running, trying to start

(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:443
no listening sockets available, shutting down
Unable to open logs

Encountered exception during recovery

Traceback (most recent call last):
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot_apache/configurator.py”, line 1998, in _reload
util.run_script(self.constant(“restart_cmd”))
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/util.py”, line 85, in run_script
raise errors.SubprocessError(msg)
certbot.errors.SubprocessError: Error while running apachectl graceful.
httpd not running, trying to start

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/client.py”, line 452, in deploy_certificate
self.installer.restart()
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot_apache/configurator.py”, line 1989, in restart
self._reload()
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot_apache/configurator.py”, line 2000, in _reload
raise errors.MisconfigurationError(str(err))
certbot.errors.MisconfigurationError: Error while running apachectl graceful.
httpd not running, trying to start

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/error_handler.py”, line 100, in _call_registered
self.funcs-1
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/client.py”, line 547, in _rollback_and_restart
self.installer.restart()
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot_apache/configurator.py”, line 1989, in restart
self._reload()
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot_apache/configurator.py”, line 2000, in _reload
raise errors.MisconfigurationError(str(err))
certbot.errors.MisconfigurationError: Error while running apachectl graceful.
httpd not running, trying to start

IMPORTANT NOTES:

  • An error occurred and we failed to restore your config and restart
    your server. Please post to
    https://community.letsencrypt.org/c/server-config with details
    about your configuration and this error you received.
  • Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/www.eu-r.com/fullchain.pem
    Your key file has been saved at:
    /etc/letsencrypt/live/www.eu-r.com/privkey.pem
    Your cert will expire on 2018-06-15. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot-auto
    again with the “certonly” option. To non-interactively renew all
    of your certificates, run “certbot-auto renew”

My domain is: eu-r.com

I ran this command: ./certbot-auto --apache

It produced this output: see above

My web server is (include version): Apache/2.2.15 (Unix)

The operating system my web server runs on is (include version): centos 6.9 (Final)

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

no idea what happened or what to do next
any help appreciated


#2

I got this sorted by removing one Listen 80
line in my httpd.config file

but now only http will load
https shows: Connection closed by server

So I thought site is not listening on 443
but when adding virtual host for 443 in my http.conf
I am back to the same error again.

checked netstat -anp|grep :443 then, output is
tcp 0 0 :::443 :::* LISTEN 18768/httpd

Can someone help me?

Thxs a lot, much appreciated


#3

Please paste your Apache configuration here so we can see what the problem may be:

tail -n +1 /etc/httpd/conf*/*

If the forum software won’t let you post it because it is too long you can use a service like pastebin.com and link to it here.


#4

Thank you for reply!
I pasted the output here: https://pastebin.com/cLQTPJr3


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.