Certbot failed to authenticate some domains (authenticator: nginx)

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: odoo.grafnet.com

I ran this command:cerbot --nginx

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

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.


1: odoo.grafnetsarl.com


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Requesting a certificate for odoo.grafnetsarl.com

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: odoo.grafnetsarl.com
Type: unauthorized
Detail: 2a02:4780:a:807:0:1724:e89c:1: Invalid response from http://odoo.grafnetsarl.com/.well-known/acme-challenge/M5wq_TqMSXkcoKsbx8HWzwTrCuEtMOr5Ad5XV0HH69M: 404

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version): nginx version: nginx/1.18.0 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 22.04
My hosting provider, if applicable, is: hostinger

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): odoo 17

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):certbot 2.10.0

Welcome @OlaIfemi667

I think you have two different problems. The first is that you have an AAAA record in your DNS for an IPv6 address. But, it points to a LiteSpeed server and not nginx. You should set the AAAA record correctly or remove it if you do not support IPv6. Let's Encyrpt favors IPv6 when present which is why you see an IPv6 address in the error message:

Detail: 2a02:4780:a:807:0:1724:e89c:1
Invalid response from http://odoo.grafnetsarl.com/.well-known/acme-challenge/M5wq_TqMSXkcoKsbx8HWzwTrCuEtMOr5Ad5XV0HH69M: 404

The second problem relates to your IPv4 address (the one in your DNS A record). Connections using port 80 (HTTP) work but then you redirect the acme challenge request to HTTPS (port 443) which times out.

The --nginx option you chose should prevent this redirection so something else has gone wrong. Possibly something in your nginx config.

Start by correcting or removing the AAAA record. If you still have a problem let us know.

The Let's Debug site is helpful when setting up new sites

2 Likes

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