The Certificate Authority failed to download the temporary challenge files created by CertBot

Hello, I keep having errors with CertBot. I have tried many things and I keep getting the same error.

My domain is:
screencrowstudios.com

I ran this command:
certbot certonly --webroot -d screencrowstudios.com -d www.screencrowstudios.com --email screencrowstudios@screencrowstudios.com -w /var/www/ScreenCrowStudios-Website/build -n --agree-tos --force-renewal

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for screencrowstudios.com and www.screencrowstudios.com

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
  Domain: screencrowstudios.com
  Type:   unauthorized
  Detail: 2a01:4f8:1061:127d::2: Invalid response from http://screencrowstudios.com/.well-known/acme-challenge/UXHa25O9aRmMkIX2idlzG4Db1yIKGdE3gzJfaDI-jOA: 404

  Domain: www.screencrowstudios.com
  Type:   unauthorized
  Detail: 2a01:4f8:1061:127d::2: Invalid response from http://www.screencrowstudios.com/.well-known/acme-challenge/6EV4MmUlIACRPuth-7m954DiBqQ53SfGKzxlwPEyzic: 404

Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded 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.

The letsencrypt.log:

2024-07-10 23:27:24,530:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 108, in handle_authorizations
    self._poll_authorizations(authzrs, max_retries, max_time_mins, best_effort)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 212, in _poll_authorizations
    raise errors.AuthorizationError('Some challenges have failed.')
certbot.errors.AuthorizationError: Some challenges have failed.

2024-07-10 23:27:24,530:DEBUG:certbot._internal.error_handler:Calling registered functions
2024-07-10 23:27:24,530:INFO:certbot._internal.auth_handler:Cleaning up challenges
2024-07-10 23:27:24,530:DEBUG:certbot._internal.plugins.webroot:Removing /var/www/ScreenCrowStudios-Website/build/.well-known/acme-challenge/UXHa25O9aRmMkIX2idlzG4Db1yIKGdE3gzJfaDI-jOA
2024-07-10 23:27:24,531:DEBUG:certbot._internal.plugins.webroot:Removing /var/www/ScreenCrowStudios-Website/build/.well-known/acme-challenge/6EV4MmUlIACRPuth-7m954DiBqQ53SfGKzxlwPEyzic
2024-07-10 23:27:24,531:DEBUG:certbot._internal.plugins.webroot:All challenges cleaned up
2024-07-10 23:27:24,531:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/snap/certbot/3832/bin/certbot", line 8, in <module>
    sys.exit(main())
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/main.py", line 19, in main
    return internal_main.main(cli_args)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/main.py", line 1894, in main
    return config.func(config, plugins)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/main.py", line 1600, in certonly
    lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/main.py", line 143, in _get_and_save_cert
    lineage = le_client.obtain_and_enroll_certificate(domains, certname)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/client.py", line 517, in obtain_and_enroll_certificate
    cert, chain, key, _ = self.obtain_certificate(domains)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/client.py", line 428, in obtain_certificate
    orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/client.py", line 496, in _get_order_and_authorizations
    authzr = self.auth_handler.handle_authorizations(orderr, self.config, best_effort)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 108, in handle_authorizations
    self._poll_authorizations(authzrs, max_retries, max_time_mins, best_effort)
  File "/snap/certbot/3832/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 212, in _poll_authorizations
    raise errors.AuthorizationError('Some challenges have failed.')
certbot.errors.AuthorizationError: Some challenges have failed.
2024-07-10 23:27:24,533:ERROR:certbot._internal.log:Some challenges have failed.

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

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

My hosting provider, if applicable, is:
Hetzner

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

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

Please send help I am losing my mind! Thanks in advance!

1 Like

Welcome to the Let's Encrypt Community, @HeadMonitor! :slightly_smiling_face:

Firstly, as a public service announcement, please don't use --force-renewal. It never fixes anything and results in hitting rate limits.

Looks like your IPv6 (AAAA) record points to Apache while your IPv4 (A) record points to nginx. Please resolve that first before proceeding.

Once resolved, please try this command:

certbot certonly --nginx -d screencrowstudios.com -d www.screencrowstudios.com --dry-run

If that command works, please try this command:

certbot --nginx -d screencrowstudios.com -d www.screencrowstudios.com

5 Likes

You are incredible! That was the issue all is fixed! Thanks a lot!

4 Likes

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