<!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: <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"><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: <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"><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>