<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">On 10/13/25 23:18, Curtis Maurand via
Pdns-users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f7c35b0a-dcdd-4f4c-aff8-64d2bcfe42ad@maurand.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<h1 id="post-title-t3_1o63s6e"
class="text-neutral-content-strong m-0 font-semibold text-18 xs:text-24 mb-xs px-md xs:px-0 xs:mb-md overflow-hidden"
aria-label="Post Title: problem with pdnsutil and the webserver api not in agreement"
aria-describedby="feed-post-credit-bar-t3_1o63s6e"> </h1>
<div class="text-neutral-content">
<div class="mb-sm mb-xs px-md xs:px-0 overflow-hidden"
data-post-click-location="text-body">
<div id="t3_1o63s6e-post-rtjson-content"
class="md text-14-scalable" style="--emote-size: 20px">
<p> Hello, </p>
<p> I have a pdns authoritative server in production. It is
version 4.9.9 running on Devuan Daedalus (Debian Bookworm
without systemd). It was installed via the powerdns repo.
All seems to be working well and will list all zones
normally. when I try do something as simple in the api as
an export zone I get a 500 error.</p>
<p>When I run</p>
<p> <code>curl -v -H "X-API-Key: <my api key>"</code>
<a
class="relative pointer-events-auto a cursor-pointer
underline
"
href="http://localhost:8443/api/v1/servers/localhost/zones/xyonethost.com/export"
rel="noopener nofollow noreferrer ugc" target="_blank"
moz-do-not-send="true"><code>http://localhost:8443/api/v1/servers/localhost/zones</code></a>
<code>|jq .</code></p>
<p><code>I get a list of zones.<br>
</code> </p>
<p> when I run: </p>
<p> <code>curl -v -H "X-API-Key: <my api key>"</code>
<a
class="relative pointer-events-auto a cursor-pointer
underline
"
href="http://localhost:8443/api/v1/servers/localhost/zones/xyonethost.com/export"
rel="noopener nofollow noreferrer ugc" target="_blank"
moz-do-not-send="true"><code>http://localhost:8443/api/v1/servers/localhost/zones/xyonethost.com/export</code></a>
<code>|jq .</code> </p>
<p> I get a 500 error when I try to run that. I check the
syslog and I get: </p>
<p> <code>[webserver] 937b5389-ae14-4ea8-ad57-2b23f18b930b
HTTP ISE for
"/api/v1/servers/localhost/zones/xyonethost.com/export":
STL Exception: Parsing record content (try 'pdnsutil
check-zone'): Data field in DNS should start with quote
(") at position 0 of 'v=DKIM1; t=s;
p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArsfaX8Im/TYQXFicVWzX3AgvWHupQ7AFK10ewMsdAahd40aDdbcOKndApLL6XUg7G21QKGdIhYKSrtRcQOqNwCkfAiFVmoVYLdAZwT0JUd0MYVDGVxy30Tx5NK4S8k7ru//z876wvm9AJgMPLlyt0RRMGSnXdH0PH1pmOCW0ECVCAYMCMlZ69NcB2zsQpjMaRfKjW36C3GYKDmW6Ibg5iw+qE97Nl2BIx4JdirTE32PSyu/mraORgNRiRLJ/6L8VZoCMxcvhxlp6ypl3vHnlou6EF1gkbALLAv9OMJSlwRihI3apzqFtt+7Wf0jmpqNvHOjBbCQZIVJ92XA899++hwIDAQAB'</code>
</p>
<p> <code>Then I run:</code> </p>
<p> <font face="monospace"><a
class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:root@sirius:/etc/powerdns/pdns.d#"
moz-do-not-send="true">root@sirius:/etc/powerdns/pdns.d#</a>
pdnsutil check-zone <a
class="relative pointer-events-auto a cursor-pointer
underline
" href="http://xyonethost.com" rel="noopener nofollow noreferrer ugc"
target="_blank" moz-do-not-send="true">xyonethost.com</a></font>
</p>
<p><font face="monospace"> Checked 18 records of
'xyonethost.com', 0 errors, 0 warnings. </font></p>
<p> This seems to be a bug. I have gone into the database
and enclosed the txt record in quotes and that did
nothing. </p>
<pre><a
class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:root@sirius:/etc/powerdns/pdns.d#"
moz-do-not-send="true">root@sirius:/etc/powerdns/pdns.d#</a> dig txt default._domainkey.xyonethost.com u/localhost +short</pre>
<p> returns </p>
<p><code>"v=DKIM1; t=s;
p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArsfaX8Im/TYQXFicVWzX3AgvWHupQ7AFK10ewMsdAahd40aDdbcOKndApLL6XUg7G21QKGdIhYKSrtRcQOqNwCkfAiFVmoVYLdAZwT0JUd0MYVDGVxy30Tx5NK4S8k7ru//z876wvm9AJgMPLlyt0RRMGSnXdH0PH1pmOCW0ECVCAYMCMlZ69NcB2zsQpjMaRfK"
"jW36C3GYKDmW6Ibg5iw+qE97Nl2BIx4JdirTE32PSyu/mraORgNRiRLJ/6L8VZoCMxcvhxlp6ypl3vHnlou6EF1gkbALLAv9OMJSlwRihI3apzqFtt+7Wf0jmpqNvHOjBbCQZIVJ92XA899++hwIDAQAB"</code></p>
<p> <code>the string in the database has no spaces or
returns in it. Have I come across a bug or am I missing
something stupid?</code> </p>
<p> <code>Thanks</code> </p>
</div>
</div>
</div>
<br>
</blockquote>
I tried enclosing all of the text fields in quotes directly in the
database and that fixed the api and I got the desired output.
Another problem on the export is that jq didn't understand the
output and was throwing an error. I'll have to come up with a query
to modify all of the txt records. That's a different discussion.
:-)<br>
<br>
Thanks for listening,<br>
Curtis<br>
</body>
</html>