Apache Error when installing Let's Encrypt


#1

Sorry if this is a common question, I’m a beginner and would appreciate any help with this. I tried looking at other similar questions on this topic and didn’t understand what Terminal commands to use.

My domain is: thefuriousgazelle.com

I ran this command: sudo certbot --apache

It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log

Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?


1: thefuriousgazelle.com

2: www.thefuriousgazelle.com


Select the appropriate numbers separated by commas and/or spaces, or leave input

blank to select all options shown (Enter ‘c’ to cancel):

Obtaining a new certificate

Performing the following challenges:

http-01 challenge for thefuriousgazelle.com

http-01 challenge for www.thefuriousgazelle.com

Error while running apache2ctl graceful.

httpd not running, trying to start

Action ‘graceful’ failed.

The Apache error log may have more information.

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

Unable to restart apache using [‘apache2ctl’, ‘graceful’]

Cleaning up challenges

Error while running apache2ctl graceful.

httpd not running, trying to start

Action ‘graceful’ failed.

The Apache error log may have more information.

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

Unable to restart apache using [‘apache2ctl’, ‘graceful’]

Encountered exception during recovery:

Traceback (most recent call last):

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2184, in _reload

util.run_script(self.option(“restart_cmd”))

File “/usr/lib/python3/dist-packages/certbot/util.py”, line 86, in run_script

raise errors.SubprocessError(msg)

certbot.errors.SubprocessError: Error while running apache2ctl graceful.

httpd not running, trying to start

Action ‘graceful’ failed.

The Apache error log may have more information.

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 75, in handle_authorizations

resp = self._solve_challenges(aauthzrs)

File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 132, in _solve_challenges

resp = self.auth.perform(all_achalls)

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2286, in perform

self.restart()

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2174, in restart

self._reload()

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2202, in _reload

raise errors.MisconfigurationError(error)

certbot.errors.MisconfigurationError: Error while running apache2ctl graceful.

httpd not running, trying to start

Action ‘graceful’ failed.

The Apache error log may have more information.

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2184, in _reload

util.run_script(self.option(“restart_cmd”))

File “/usr/lib/python3/dist-packages/certbot/util.py”, line 86, in run_script

raise errors.SubprocessError(msg)

certbot.errors.SubprocessError: Error while running apache2ctl graceful.

httpd not running, trying to start

Action ‘graceful’ failed.

The Apache error log may have more information.

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/usr/lib/python3/dist-packages/certbot/error_handler.py”, line 108, in _call_registered

self.funcs-1

File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 316, in _cleanup_challenges

self.auth.cleanup(achalls)

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2311, in cleanup

self.restart()

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2174, in restart

self._reload()

File “/usr/lib/python3/dist-packages/certbot_apache/configurator.py”, line 2202, in _reload

raise errors.MisconfigurationError(error)

certbot.errors.MisconfigurationError: Error while running apache2ctl graceful.

httpd not running, trying to start

Action ‘graceful’ failed.

The Apache error log may have more information.

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

Error while running apache2ctl graceful.

httpd not running, trying to start

Action ‘graceful’ failed.

The Apache error log may have more information.

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

My web server is (include version): Ubuntu?

The operating system my web server runs on is (include version): Ubuntu 14.04

My hosting provider, if applicable, is: Digital Ocean

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


#2
Server: lighttpd/1.4.33

You are running lighttpd, not Apache. (Or at least, running it in front of Apache).

You will need to use Certbot’s certonly mode, as well as the --webroot authenticator.

Instructions for how to do that can be found here: https://certbot.eff.org/lets-encrypt/ubuntutrusty-other


#3

Thanks. Do you know how to set up a webroot directory? It looks like I need to do that to use the --webroot command. Thanks for your help!


#4

Hi. I just created a webroot folder (I think) using sudo mkdir -p /var/www/html

Then I ran this command:
sudo certbot certonly --webroot -w /var/www/html -d thefuriousgazelle.com -d www.thefuriousgazelle.com

I got this result. I’m not sure how to resolve the error message. Do you have any idea what my next step should be? Thanks!

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Plugins selected: Authenticator webroot, Installer None

Obtaining a new certificate

Performing the following challenges:

http-01 challenge for thefuriousgazelle.com

http-01 challenge for www.thefuriousgazelle.com

Using the webroot path /var/www/html for all unmatched domains.

Waiting for verification…

Cleaning up challenges

Failed authorization procedure. thefuriousgazelle.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://thefuriousgazelle.com/.well-known/acme-challenge/pl0WwGc76dyhOVWFOUH0vvNje1Bda1-qq9gxl1nO6VU: "<!DOCTYPE html>\n\n<html lang=“en-US”>\n\n\t<head>\n\t\t\n\t\t<meta charset=“UTF-8”>\n\t\t<meta name=“viewport” content=“width=device-width, i”, www.thefuriousgazelle.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.thefuriousgazelle.com/.well-known/acme-challenge/59L-7mpC-KYHlLw1ovQi5WH8oYdkPoC6lBuP6ftU9iE: "<!DOCTYPE html>\n\n<html lang=“en-US”>\n\n\t<head>\n\t\t\n\t\t<meta charset=“UTF-8”>\n\t\t<meta name=“viewport” content=“width=device-width, i”

IMPORTANT NOTES:

  • The following errors were reported by the server:

Domain: thefuriousgazelle.com

Type: unauthorized

Detail: Invalid response from

http://thefuriousgazelle.com/.well-known/acme-challenge/pl0WwGc76dyhOVWFOUH0vvNje1Bda1-qq9gxl1nO6VU:

"<!DOCTYPE html>\n\n<html

lang=“en-US”>\n\n\t<head>\n\t\t\n\t\t<meta

charset=“UTF-8”>\n\t\t<meta name=“viewport”

content=“width=device-width, i”

Domain: www.thefuriousgazelle.com

Type: unauthorized

Detail: Invalid response from

http://www.thefuriousgazelle.com/.well-known/acme-challenge/59L-7mpC-KYHlLw1ovQi5WH8oYdkPoC6lBuP6ftU9iE:

"<!DOCTYPE html>\n\n<html

lang=“en-US”>\n\n\t<head>\n\t\t\n\t\t<meta

charset=“UTF-8”>\n\t\t<meta name=“viewport”

content=“width=device-width, i”

To fix these errors, please make sure that your domain name was

entered correctly and the DNS A/AAAA record(s) for that domain

contain(s) the right IP address.


#5

The --webroot -w /directory must match the actual document root directory for that vhost for it to work.


#6

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