robin-thoni / certbot-pdns

Authenticator plugin for certbot
38 stars 10 forks source link

api error with certbot-pdns issue #9

Open bnkcrypt opened 5 years ago

bnkcrypt commented 5 years ago

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'}

robin-thoni commented 5 years ago

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

C0rn3j commented 4 years ago

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.