Error when running certbot on ubuntu

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. crt.sh | 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: nutch.io

I ran this command: sudo certbot certonly --apache

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): nutch.io
Requesting a certificate for nutch.io

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: nutch.io
Type: unauthorized
Detail: The key authorization file from the server did not match this challenge. Expected "nL2wKmHB_Vybj9J55FQV2OwB77nIEEOaso709Xux7rc.aF2IfBhSvpoJ3J52iOLj1hGmy9r98R-1lejAbxPze60" (got "nL2wKmHB_Vybj9J55FQV2OwB77nIEEOaso709Xux7rc.4E3VCTFsySjUrqnCg0ooULx-3kbdPBygi0aWkvg5Gd8")

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

Some challenges have failed.

My web server is (include version):

Server version: Apache/2.4.58 (Ubuntu)
Server built: 2024-07-17T18:55:23

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

Linux ns5028403 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

My hosting provider, if applicable, is:

OVH dedicated server (metal)

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, command line

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

1 Like

Welcome @sartgegru

It looks like your DNS AAAA address for IPv6 points to a different Apache server than the one in the DNS A record for IPv4.

Let's Encrypt prefers IPv6 when present.

You should set the AAAA record to the correct public IPv6 address. Or, remove that record if you do not support IPv6

Note particularly the "Server" response header for IPv4 and v6 is different

Address=2001:41d0:301::26,Address Type=IPv6,Server=Apache

Address=15.235.67.205,Address Type=IPv4,Server=Apache/2.4.58 (Ubuntu)
4 Likes

Thank you, removing the AAAA entry worked!

5 Likes

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