nginx-proxy-manager
nginx-proxy-manager copied to clipboard
Error with certbot-dns-ovh but working fine outside of NPM
HI,
Thanks for this awesome projet.
If someone have time to help me debug this, when i ask for a dns challenge with OVH provider, i got this error :
Error: Command failed: /opt/certbot/bin/certbot certonly --non-interactive --cert-name "npm-63" --agree-tos --email "[email protected]" --domains "*.xxxxxxx.com" --authenticator dns-ovh --dns-ovh-credentials "/etc/letsencrypt/credentials/credentials-63"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator dns-ovh, Installer None
Performing the following challenges:
dns-01 challenge for xxxxxx.com
Cleaning up challenges
Encountered exception during recovery: TypeError: delete_record() got an unexpected keyword argument 'type'
An unexpected error occurred:
TypeError: create_record() got an unexpected keyword argument 'type'
Please see the logfiles in /var/log/letsencrypt for more details.
at ChildProcess.exithandler (node:child_process:326:12)
at ChildProcess.emit (node:events:369:20)
at maybeClose (node:internal/child_process:1067:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
The dns challenge works fine outside of this project, and i checked twice credentials.
I don't really know where to look now
Thansk,

Yeah I have the same issue except I'm using PowerDNS for the challenge. letsencrypt.log shows
2021-05-11 16:00:47,493:INFO:certbot._internal.auth_handler:dns-01 challenge for removed.com
2021-05-11 16:00:47,493:INFO:certbot._internal.auth_handler:dns-01 challenge for removed.com
2021-05-11 16:00:47,499:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.removed.com:443
2021-05-11 16:00:47,681:DEBUG:urllib3.connectionpool:https://api.removed.com:443 "GET /api/v1/servers/localhost/zones/removed.com. HTTP/1.1" 200 3749
2021-05-11 16:00:47,683:DEBUG:lexicon.providers.powerdns:response: removed
2021-05-11 16:00:47,684:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/auth_handler.py", line 70, in handle_authorizations
resps = self.auth.perform(achalls)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common.py", line 60, in perform
self._perform(domain, validation_domain_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot_dns_powerdns/dns_powerdns.py", line 55, in _perform
domain, validation_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common_lexicon.py", line 48, in add_txt_record
self.provider.create_record(type='TXT', name=record_name, content=record_content)
TypeError: create_record() got an unexpected keyword argument 'type'
2021-05-11 16:00:47,684:DEBUG:certbot._internal.error_handler:Calling registered functions
2021-05-11 16:00:47,684:INFO:certbot._internal.auth_handler:Cleaning up challenges
2021-05-11 16:00:47,687:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.removed.com
2021-05-11 16:00:47,849:DEBUG:urllib3.connectionpool:https://api.removed.com:443 "GET /api/v1/servers/localhost/zones/removed.com. HTTP/1.1" 200 3749
2021-05-11 16:00:47,852:DEBUG:lexicon.providers.powerdns:response: removed
2021-05-11 16:00:47,853:ERROR:certbot._internal.error_handler:Encountered exception during recovery: TypeError: delete_record() got an unexpected keyword argument 'type'
2021-05-11 16:00:47,854:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/opt/certbot/bin/certbot", line 8, in <module>
sys.exit(main())
File "/opt/certbot/lib/python3.7/site-packages/certbot/main.py", line 15, in main
return internal_main.main(cli_args)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 1435, in main
return config.func(config, plugins)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 1304, in certonly
lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 140, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/client.py", line 444, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/client.py", line 374, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/client.py", line 424, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/auth_handler.py", line 70, in handle_authorizations
resps = self.auth.perform(achalls)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common.py", line 60, in perform
self._perform(domain, validation_domain_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot_dns_powerdns/dns_powerdns.py", line 55, in _perform
domain, validation_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common_lexicon.py", line 48, in add_txt_record
self.provider.create_record(type='TXT', name=record_name, content=record_content)
TypeError: create_record() got an unexpected keyword argument 'type'
2021-05-11 16:00:47,856:ERROR:certbot._internal.log:An unexpected error occurred:
2021-05-11 16:00:47,857:ERROR:certbot._internal.log:TypeError: create_record() got an unexpected keyword argument 'type'
Found a PR related to this https://github.com/certbot/certbot/pull/8819
Yeah, since this PR is now merged, I will close this issue. Let's hope the next release comes as quickly as possible :crossed_fingers: