alex3305 / home-assistant-addons

Alex's Home Assistant Add-ons
https://alex3305.github.io/home-assistant-docs/
MIT License
47 stars 29 forks source link

Wrong DuckDNS TXT record update URL #7

Closed lfhohmann closed 4 years ago

lfhohmann commented 4 years ago

I'm trying to get Traefik+DuckDNS+LetsEncrypt to work on my hass.io system, this is my configuration:

log_level: INFO
access_logs: false
forwarded_headers_insecure: false
dynamic_configuration_path: /share
letsencrypt:
  enabled: true
  email: EMAIL@EMAIL.COM
  challenge_type: dnsChallenge
  provider: duckdns
env_vars:
  - DUCKDNS_TOKEN=abcd1234efgh5678ijkl90

But it's unable to get the Certificates, it returns the following error:

time="2020-07-01T22:40:59-03:00" level=error msg="Unable to obtain ACME certificate for domains \"subdomain.domain.duckdns.org\": unable to generate a certificate for the domains [subdomain.domain.duckdns.org]: error: one or more domains had a problem:\n[subdomain.domain.duckdns.org] [subdomain.domain.duckdns.org] acme: error presenting token: request to change TXT record for DuckDNS returned the following result (KO) this does not match expectation (OK) used url [https://www.duckdns.org/update?clear=false&domains=domain.duckdns.org&token=abcd1234efgh5678ijkl90+&txt=ABCDEFGHTASDF]\n" providerName=le.acme rule="Host(`subdomain.domain.duckdns.org`)" routerName=homeAssistantRouter@file

Right after the token value and before de "&txt=" theres a plus sign, when I type that URL (with the plus sign) on Chrome navigator, it returns KO, but if I remove the plus sign (https://www.duckdns.org/update?clear=false&domains=domain.duckdns.org&token=abcd1234efgh5678ijkl90&txt=ABCDEFGHTASDF) it returns OK

Any idea on how can I solve this?

(EDIT: By the way, this is only preventing me from having a working certificate, routing works just fine, Traefik is able to redirect the "subdomain.domain.duckdns.org" to the proper internal url and port)

alex3305 commented 4 years ago

Thanks for using this add-on.

I have just updated the add-on to version 3.0.1 which re-enabled logging for environment variables. I also created #9 to fix logging levels. Could you please run the add-on and share the logging which relates to environment variables. In your case it should be something like this:

[18:27:20] INFO: Extracting environment variables...
[18:27:20] INFO: Extracted variables DUCKDNS_TOKEN=abcd1234efgh5678ijkl90

I really want to know whether or not this is a Treafik issue, ACME / LEGO issue or perhaps an issue with this add-on.

github-actions[bot] commented 4 years ago

Stale issue.