<div dir="ltr">Returning a {"result":false} was one of the things I did test. But that response does not make sense.<br>A false response suggests the backend failed to process the query successfully.<div>In this case, the query is processed successfully, but there is just no response data to provide. i.e. the domain requested does not exist.</div><div>So issuing a false as a result does not make sense to me.</div><div><br></div><div>The documentation on the query says</div><div><i>"Retrieves information about given domain from the backend. If your return value has no zone attribute, the backend will signal error. Everything else will default to something. Default values: serial:0, kind:NATIVE, id:-1, notified_serial:-1, last_check:0, masters: []. Masters, if present, must be array of strings."</i><br></div><div>Which suggests the response must at minimum have the zone attribute i.e. {"result": { "zone": ???? }}, I've tried this with the following zone values "", null, {} but all fail.</div><div><br></div><div>I've set loglevel=9 but despite this level supposedly being verbose, there is very little produced.</div><div>Here is all the logs from startup to execution of the /domain/add api call</div><div><br></div><div>Jan 25 00:38:34 Listening on controlsocket in '/var/run/pdns.controlsocket'<br>Jan 25 00:38:34 Guardian is launching an instance<br>Jan 25 00:38:34 Reading random entropy from '/dev/urandom'<br>Jan 25 00:38:34 Loading '/usr/lib/x86_64-linux-gnu/pdns/libremotebackend.so'<br>Jan 25 00:38:34 [RemoteBackend] This is the remote backend version 4.1.6 reporting<br>Jan 25 00:38:34 This is a guarded instance of pdns<br>Jan 25 00:38:34 UDP server bound to <a href="http://0.0.0.0:53">0.0.0.0:53</a><br>Jan 25 00:38:34 UDPv6 server bound to [::]:53<br>Jan 25 00:38:34 TCP server bound to <a href="http://0.0.0.0:53">0.0.0.0:53</a><br>Jan 25 00:38:34 TCPv6 server bound to [::]:53<br>Jan 25 00:38:34 PowerDNS Authoritative Server 4.1.6 (C) 2001-2018 PowerDNS.COM BV<br>Jan 25 00:38:34 Using 64-bits mode. Built using gcc 8.3.0.<br>Jan 25 00:38:34 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.<br>Jan 25 00:38:34 Listening for HTTP requests on <a href="http://0.0.0.0:8081">0.0.0.0:8081</a><br>Jan 25 00:38:34 Doing stub resolving, using resolvers: 172.18.112.1, 192.168.1.1<br>Jan 25 00:38:34 Question got answered by 192.168.1.1<br>Jan 25 00:38:34 Could not retrieve security status update for '4.1.6-3.Debian' on 'auth-4.1.6-3.Debian.security-status.secpoll.powerdns.com.', RCODE = Non-Existent domain<br>Jan 25 00:38:34 Creating backend connection for TCP<br>Jan 25 00:38:34 About to create 3 backend threads for UDP<br>Jan 25 00:38:35 Done launching threads, ready to distribute questions<br>Jan 25 00:38:56 HTTP: Handling request "/api/v1/servers/localhost/zones"<br>Jan 25 00:38:56 Reconnecting to backend<br>Jan 25 00:38:57 closing socket connection<br>Jan 25 00:38:57 HTTP: Result for "/api/v1/servers/localhost/zones": 200, body length: 2<br>Jan 25 00:38:57 HTTP: Handling request "/api/v1/servers/localhost/statistics"<br>Jan 25 00:38:57 HTTP: Result for "/api/v1/servers/localhost/statistics": 200, body length: 3954<br>Jan 25 00:39:50 HTTP: Handling request "/api/v1/servers/localhost/zones"<br>Jan 25 00:39:50 Reconnecting to backend<br>Jan 25 00:39:50 closing socket connection<br>Jan 25 00:39:50 HTTP: Result for "/api/v1/servers/localhost/zones": 422, body length: 46<br></div><div><br></div><div>Any other suggestions ?</div><div>Thanks</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 25, 2020 at 2:12 AM Aki Tuomi <<a href="mailto:cmouse@cmouse.fi">cmouse@cmouse.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Jan 25, 2020 at 12:38:26AM +0930, Austin Brandis wrote:<br>
> Hi,<br>
> <br>
> Please let me know if I'm not on the right mailing list.<br>
> I've searched all the github issues, and elsewhere but have not found<br>
> anything helpful.<br>
> <br>
> Currently developing a remote backend, but am having some trouble with the<br>
> getDomainInfo call.<br>
> <br>
> I'm making a POST request to the web API to /domain/add<br>
> <br>
> Here is where I get lost...<br>
> My backend receives a getDomainInfo query after an Initialize.<br>
> Whilst I found this initially odd, I figured that maybe PDNS was confirming<br>
> the presence of any domain first, and then an "set" query would be issued<br>
> later.<br>
> Though the documentation for remote backend (<br>
> <a href="https://doc.powerdns.com/authoritative/backends/remote.html" rel="noreferrer" target="_blank">https://doc.powerdns.com/authoritative/backends/remote.html</a>) also does not<br>
> indicate which "query" does the adding.<br>
> I figured I'd just work it out when the relevant JSON arrives.<br>
> <br>
> My backend receives a getDomainInfo JSON as such<br>
> <<a href="https://doc.powerdns.com/authoritative/backends/remote.html#getdomaininfo" rel="noreferrer" target="_blank">https://doc.powerdns.com/authoritative/backends/remote.html#getdomaininfo</a>><br>
> e.g.  {"method":"getdomaininfo","parameters":{"name":"<a href="http://foo.com" rel="noreferrer" target="_blank">foo.com</a>"}}<br>
> <br>
> when <a href="http://foo.com" rel="noreferrer" target="_blank">foo.com</a> does not exit it is unclear in the documentation what the<br>
> backend should return.<br>
> No matter what I try the HTTP response from the WEB API after the POST is<br>
> always 400, and PDNS closes the socket to my backend.<br>
> All suggesting PDNS remote is not happy with the JSON response to the<br>
> getDomainInfo query<br>
> <br>
> I have tried<br>
> {"result":{}}<br>
> {"result":""}<br>
> {"result":null}<br>
> {"result":false}<br>
> {"result":"zone":{}}<br>
> {"result":"zone":""}<br>
> {"result":"zone":null}<br>
> responses, but none work.<br>
> <br>
> What am I doing wrong ?<br>
> I assume domain additions are implemented in remote backend ?<br>
> <br>
> Thanks<br>
> Austin<br>
<br>
Hi!<br>
<br>
"You must always reply with JSON hash with at least one key, ‘result’. This must be boolean false if the query failed."<br>
<br>
If this does not work though, it could be a bug. Is there anything in logs?<br>
<br>
Aki<br>
</blockquote></div>