Hi, I'm having issues verifying DNS records using certbot:v1.18.0 docker image. I had this working about a year ago so I'm not sure what's going wrong.
I'm running certonly with the domain parameters as such:
certbot certonly -nd 'example.com' -d '*.example.com' \
--manual --preferred-challenges dns \
--manual-auth-hook /vimexx/auth \
--manual-cleanup-hook /vimexx/clean \
--agree-tos --manual-public-ip-logging-ok --no-eff-email \
--dry-run --debug \
--email 'user@gmail.com'
Logs below. What seems to be happening is my auth-hook script is called twice with different TXT record contents, the second overwriting the first, then the TXT record is compared against the contents of the first write. The last time I worked with this, I seem to remember there was only one auth request done for both example.com and *.example.com at the same time.
What am I missing? Did something change? As far as I know I just need to create 1 TXT record named _acme-challenge.example.com.
certbot_1 | Account registered.
certbot_1 | Simulating a certificate request for example.com and *.example.com
certbot_1 | Hook '--manual-auth-hook' for example.com ran with output:
certbot_1 | Authenticating example.com with 7nGb4ZVr-_pV75l0iMZvlrttlbLF12TJxPOAmHAbC_U
certbot_1 | Setting example.com to 7nGb4ZVr-_pV75l0iMZvlrttlbLF12TJxPOAmHAbC_U
certbot_1 | Hook '--manual-auth-hook' for example.com ran with output:
certbot_1 | Authenticating example.com with u3Y0IQGRe7N-65oucbSLNCXvW5nxOSjoCItDOiGzGXU
certbot_1 | Replacing example.com with u3Y0IQGRe7N-65oucbSLNCXvW5nxOSjoCItDOiGzGXU
certbot_1 |
certbot_1 | Certbot failed to authenticate some domains (authenticator: manual). The Certificate Authority reported these problems:
certbot_1 | Domain: example.com
certbot_1 | Type: unauthorized
certbot_1 | Detail: Incorrect TXT record "u3Y0IQGRe7N-65oucbSLNCXvW5nxOSjoCItDOiGzGXU" found at _acme-challenge.example.com
certbot_1 |
certbot_1 | Hint: The Certificate Authority failed to verify the DNS TXT records created by the --manual-auth-hook. Ensure that this hook is functioning correctly and that it waits a sufficient duration of time for DNS propagation. Refer to "certbot --help manual" and the Certbot User Guide.
certbot_1 |
certbot_1 | Saving debug log to /var/log/letsencrypt/letsencrypt.log
certbot_1 | Exiting abnormally:
certbot_1 | Traceback (most recent call last):
certbot_1 | File "/usr/local/bin/certbot", line 33, in <module>
certbot_1 | sys.exit(load_entry_point('certbot', 'console_scripts', 'certbot')())
certbot_1 | File "/opt/certbot/src/certbot/certbot/main.py", line 15, in main
certbot_1 | return internal_main.main(cli_args)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 1566, in main
certbot_1 | return config.func(config, plugins)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 1426, in certonly
certbot_1 | lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 128, in _get_and_save_cert
certbot_1 | lineage = le_client.obtain_and_enroll_certificate(domains, certname)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/client.py", line 456, in obtain_and_enroll_certificate
certbot_1 | cert, chain, key, _ = self.obtain_certificate(domains)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/client.py", line 386, in obtain_certificate
certbot_1 | orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/client.py", line 436, in _get_order_and_authorizations
certbot_1 | authzr = self.auth_handler.handle_authorizations(orderr, self.config, best_effort)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/auth_handler.py", line 90, in handle_authorizations
certbot_1 | self._poll_authorizations(authzrs, max_retries, best_effort)
certbot_1 | File "/opt/certbot/src/certbot/certbot/_internal/auth_handler.py", line 178, in _poll_authorizations
certbot_1 | raise errors.AuthorizationError('Some challenges have failed.')
certbot_1 | certbot.errors.AuthorizationError: Some challenges have failed.
certbot_1 | 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.
myservices_certbot_1 exited with code 1