Powerdns recursor api tips Error #15897
Unanswered
zhaohong-ponyai
asked this question in
Q&A
Replies: 1 comment
-
Recursot 4.5.x is ancient and not supported anymore. As a first step, try to run a supported version. See https://docs.powerdns.com/recursor/appendices/EOL.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background:
Use docker image powerdns/pdns-recursor-45:latest, Then set PDNS_RECURSOR_API_KEY variable to enable the Api
Phenomenon:
Forward-zone creation via restful api calls
Request:
curl -H "Content-type: application/json" -H 'X-API-Key: abcdefghijklmn' -X POST -d '{"name":"test-query.my-domain.com. ","type":"Zone","kind":"Forwarded","servers":["8.8.8.8"],"recursion_desired":false}' http://127.0.0.1:8081/api/v1/servers/localhost/zones
In my recursor docker service, the api configuration file is as follows:
Then when docker runs, the container path
/etc/powerdns/pdns-recursor
is also mounted to the host, and then after calling api, i can also see that this directory generates a new forward-zone file, but api will give an error message{"error": "Could not find domain 'test-query.my-domain.com}
, it seems that the recursor service can not load this api-config-dir file. I tried configuringforward-zones= test-query.my-domain-two.com = 8.8.8.8:53
in recursor.conf to load this configuration successfully, but the api-conf-dir file was not loaded successfully, but it was created by api call.How do I troubleshoot the problem? I have tried to deploy recursor directly in the virtual machine, and then use the same api call to create a forward-zone is OK, but after changing to docker, it won't work. Please help me take a look? Thanks
Beta Was this translation helpful? Give feedback.
All reactions