certbot-pdns
certbot-pdns copied to clipboard
api error with certbot-pdns issue
Hi my api is working fine with pdns it returns all zones successfully just that when u try with certbot-pdns it gives me follwing error there is no http basic auth enabled to server and the api fund just fine on same server with http://127.0.0.1 if i use curl command .
Encountered exception during recovery: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/certbot/error_handler.py", line 108, in _call_registered self.funcs-1 File "/usr/lib/python2.7/site-packages/certbot/auth_handler.py", line 323, in _cleanup_challenges self.auth.cleanup(achalls) File "/usr/lib/python2.7/site-packages/certbot_pdns/authenticator.py", line 75, in cleanup self.backend.cleanup(achall) File "/usr/lib/python2.7/site-packages/certbot_pdns/PdnsApiAuthenticator.py", line 112, in cleanup self.update_soa(zone["name"]) File "/usr/lib/python2.7/site-packages/certbot_pdns/PdnsApiAuthenticator.py", line 48, in update_soa raise errors.PluginError("Bad return from PDNS API when getting zone %s: %s" % (zone_name, zone)) PluginError: Bad return from PDNS API when getting zone designyoga.eu.: {u'error': u'Internal Server Error'}
Problem seems to be when retrieving the zone itself, on "/servers/localhost/zones/designyoga.eu". Server is returning internal error. I'd suggest to try that url by hand (you said you tried to list all zones, but not getting one zone).
Edit: I just saw there's a final dot to the domain name on your logs, don't forget to include it when trying with curl
Update PDNS to at least 4.2 (which does some depreciations, possibly making this issue apparent) and run pdnsutil check-all-zones on your server.
For me this issue turned out to be a broken SOA record.
This is not a problem with the plugin, but with PDNS, as you'll get the same issue if you try to curl the API endpoint.