Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using ddns provider returns "ValueError: input to from_text() must be a string" #887

Open
Catscrash opened this issue Nov 2, 2022 · 0 comments

Comments

@Catscrash
Copy link

Catscrash commented Nov 2, 2022

When trying to issue a certificate with the ddns provider, it fails with the following error message (create and cleanup hook the same)

2022-11-02 10:24:39,223:WARNING:certbot.display.ops:Hook '--manual-cleanup-hook' for dnsrobotest1.xxx ran with error output:
 Error while executing the `cleanup` hook:
 input to from_text() must be a string
 Traceback (most recent call last):
   File "/root/.local/pipx/venvs/dnsrobocert/lib/python3.10/site-packages/dnsrobocert/core/hooks.py", line 40, in main
     globals()[parsed_args.type](dnsrobocert_config, parsed_args.lineage)
   File "/root/.local/pipx/venvs/dnsrobocert/lib/python3.10/site-packages/dnsrobocert/core/hooks.py", line 123, in cleanup
     txt_challenge(certificate, profile, token, domain, action="delete")
   File "/root/.local/pipx/venvs/dnsrobocert/lib/python3.10/site-packages/dnsrobocert/core/challenge.py", line 58, in txt_challenge
     Client(lexicon_config).execute()
   File "/root/.local/pipx/venvs/dnsrobocert/lib/python3.10/site-packages/lexicon/client.py", line 99, in execute
     return self.provider.delete_record(identifier, record_type, name, content)
   File "/root/.local/pipx/venvs/dnsrobocert/lib/python3.10/site-packages/lexicon/providers/base.py", line 118, in delete_record
     return self._delete_record(
   File "/root/.local/pipx/venvs/dnsrobocert/lib/python3.10/site-packages/lexicon/providers/ddns.py", line 149, in _delete_record
     name = dns.name.from_text(name).relativize(dns.name.from_text(self.zone))
   File "/root/.local/pipx/venvs/dnsrobocert/lib/python3.10/site-packages/dns/name.py", line 908, in from_text
     raise ValueError("input to from_text() must be a string")
 ValueError: input to from_text() must be a string

The config file currently looks like this:

draft: false
acme:
  email_account: xxxxxxxxx
  staging: true
profiles:
- name: test
  provider: ddns
  provider_options:
    ddns_server: "xxx.xxx.xxx.xxx"
    auth_token: "HMAC-SHA512:xxx.key:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="
certificates:
- domains:
  - "dnsrobotest1.xxx"
  - "*.dnsrobotest1.xxx"
  profile: test

we tried playing around with " or ' around the different options, but nothing helped. Running lexicon itself works fine and the DNS entry gets properly created:

~/.local/bin/lexicon ddns create xxx TXT --name="_acme-challenge.dnsrobotest1.xxx." --content="challenge token" --ddns-server xxx --auth-token 'HMAC-SHA512:xxx.key:xxxxxxxxxxxxxxxxxxxx==' 

RESULT
------
True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant