webserver api and pdnsutil not in agreement

Curtis Maurand via Pdns-users <[email protected]> Mon, 13 Oct 2025 23:18:57 -0400
Newsgroups gmane.network.dns.powerdns.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============4784431061645425251==
Content-Type: multipart/alternative;
 boundary="------------HlcHZzmg50Rb5u5wJHimx0jp"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------HlcHZzmg50Rb5u5wJHimx0jp
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit


Hello,

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.

When I run

|curl -v -H "X-API-Key: <my api key>"| 
|http://localhost:8443/api/v1/servers/localhost/zones| 
<http://localhost:8443/api/v1/servers/localhost/zones/xyonethost.com/export> 
||jq .|

|I get a list of zones.
|

when I run:

|curl -v -H "X-API-Key: <my api key>"| 
|http://localhost:8443/api/v1/servers/localhost/zones/xyonethost.com/export| 
<http://localhost:8443/api/v1/servers/localhost/zones/xyonethost.com/export> 
||jq .|

I get a 500 error when I try to run that. I check the syslog and I get:

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


|Then I run:|

root@sirius:/etc/powerdns/pdns.d# pdnsutil check-zone xyonethost.com 
<http://xyonethost.com>

Checked 18 records of 'xyonethost.com', 0 errors, 0 warnings.

This seems to be a bug. I have gone into the database and enclosed the 
txt record in quotes and that did nothing.

root@sirius:/etc/powerdns/pdns.d# dig txt default._domainkey.xyonethost.com u/localhost +short

returns

|"v=DKIM1; t=s; 
p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArsfaX8Im/TYQXFicVWzX3AgvWHupQ7AFK10ewMsdAahd40aDdbcOKndApLL6XUg7G21QKGdIhYKSrtRcQOqNwCkfAiFVmoVYLdAZwT0JUd0MYVDGVxy30Tx5NK4S8k7ru//z876wvm9AJgMPLlyt0RRMGSnXdH0PH1pmOCW0ECVCAYMCMlZ69NcB2zsQpjMaRfK" 
"jW36C3GYKDmW6Ibg5iw+qE97Nl2BIx4JdirTE32PSyu/mraORgNRiRLJ/6L8VZoCMxcvhxlp6ypl3vHnlou6EF1gkbALLAv9OMJSlwRihI3apzqFtt+7Wf0jmpqNvHOjBbCQZIVJ92XA899++hwIDAQAB"|

|the string in the database has no spaces or returns in it. Have I come 
across a bug or am I missing something stupid?|

|Thanks|

--------------HlcHZzmg50Rb5u5wJHimx0jp
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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: &lt;my api key&gt;"</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"><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></p>
          <p> when I run: </p>
          <p> <code>curl -v -H "X-API-Key: &lt;my api key&gt;"</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"><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" href="mailto:root@sirius:/etc/powerdns/pdns.d#">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">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" href="mailto:root@sirius:/etc/powerdns/pdns.d#">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>
  </body>
</html>

--------------HlcHZzmg50Rb5u5wJHimx0jp--

--===============4784431061645425251==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pdns-users mailing list
[email protected]
https://mailman.powerdns.com/mailman/listinfo/pdns-users

--===============4784431061645425251==--