addons: LetsEncrypt cannot obtain certificate with RFC2136 Server (HA 0.113.2)

Hi,

I am trying to use LetsEncrypt to get a certificate for a private domain behind a DNS server that I control. I set up RFC2136 dynamic update but when I configure the LetsEncrypt plugin I get an error. The log says:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] file-structure.sh: executing... 
[cont-init.d] file-structure.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[12:05:40] INFO: Selected DNS Provider: dns-rfc2136
[12:05:40] INFO: Use propagation seconds: 60
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator dns-rfc2136, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for name.dom.ain
Cleaning up challenges
Encountered exception during recovery: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/certbot/_internal/auth_handler.py", line 70, in handle_authorizations
    resps = self.auth.perform(achalls)
  File "/usr/local/lib/python3.7/site-packages/certbot/plugins/dns_common.py", line 57, in perform
    self._perform(domain, validation_domain_name, validation)
  File "/usr/local/lib/python3.7/site-packages/certbot_dns_rfc2136/_internal/dns_rfc2136.py", line 76, in _perform
    self._get_rfc2136_client().add_txt_record(validation_name, validation, self.ttl)
  File "/usr/local/lib/python3.7/site-packages/certbot_dns_rfc2136/_internal/dns_rfc2136.py", line 83, in _get_rfc2136_client
    int(self.credentials.conf('port') or self.PORT),
ValueError: invalid literal for int() with base 10: 'null'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/certbot/_internal/error_handler.py", line 125, in _call_registered
    self.funcs[-1]()
  File "/usr/local/lib/python3.7/site-packages/certbot/_internal/auth_handler.py", line 243, in _cleanup_challenges
    self.auth.cleanup(achalls)
  File "/usr/local/lib/python3.7/site-packages/certbot/plugins/dns_common.py", line 76, in cleanup
    self._cleanup(domain, validation_domain_name, validation)
  File "/usr/local/lib/python3.7/site-packages/certbot_dns_rfc2136/_internal/dns_rfc2136.py", line 79, in _cleanup
    self._get_rfc2136_client().del_txt_record(validation_name, validation)
  File "/usr/local/lib/python3.7/site-packages/certbot_dns_rfc2136/_internal/dns_rfc2136.py", line 83, in _get_rfc2136_client
    int(self.credentials.conf('port') or self.PORT),
ValueError: invalid literal for int() with base 10: 'null'
An unexpected error occurred:
ValueError: invalid literal for int() with base 10: 'null'
Please see the logfiles in /var/log/letsencrypt for more details.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

The configuration I am using says:

email: me@dom.ain
domains:
  - name.dom.ain
certfile: fullchain.pem
keyfile: privkey.pem
challenge: dns
dns:
  provider: dns-rfc2136
  rfc2136_server: dns.server.name
  rfc2136_name: TheName
  rfc2136_secret: >-
    PART1
    PART2
  rfc2136_algorithm: HMAC-SHA512

Do I NEED to supply the rfc2136_port setting? Does it not use the default? Also, where can I find /var/log/letsencrypt – and is there a way to run a --dry-run?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (11 by maintainers)

Commits related to this issue

Most upvoted comments

It would be nice if the owners would just update the documentation! That would save other people time and effort, too. 😉

FYI adding “rfc2136_port: 53” to the config gives me a schema error. If I quote it, tho: rfc2136_port: ‘53’ – then it works. So clearly rfc2136_port is a required parameter and it must be a quoted number. How… odd. But at least it’s now contacting my DNS server properly. Either the schema should be changed or the documentation should be updated that you need to quote the port number. Thanks!