<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Well, if it works for other zones, it's unlikely to be an OS problem unless that zone was built in the system using an older version that did things slightly differently and now it can't be removed because of that difference.  Have you tried comparing a working
 zone that can be deleted from the problem zone with rndc zonestatus and rndc showzone?  Maybe something will stand out there.  But at this point, all I have to suggest is theoretical.  Sorry, I don't know how to manually remove / rebuild the zone database. 
 If you're stuck after this and no one has any further suggestions, I'd recommend turning up the logging level on named and comparing operations or doing them under strace and seeing where success and failure diverge.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best of luck,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Scott<br>
</div>
<div>
<div><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0);">
<br>
<hr tabindex="-1" style="display:inline-block; width:98%;">
<b>From:</b> BÖSCH Christian<br>
<b>Sent:</b> Tuesday, October 13, 2020 2:23 AM<br>
<b>To:</b> Scott A. Wozny<br>
<b>Cc:</b> bind-users@lists.isc.org<br>
<b>Subject:</b> Re: unable to delzone
<div><br>
</div>
</div>
<div class="rps_3964">
<div link="#0563C1" vlink="#954F72" style="word-wrap:break-word" lang="en-AT">
<div class="x_WordSection1">
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US">OS running is FreeBSD 12.1 with bind version 9.16.7.</span></p>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US">I'm running rndc commands as root user.</span></p>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US">Yes, the zone was created with rndc addzone. And it's also possible to add and delete other zones this way.</span></p>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US">Only the one particular zone throws this error.
</span></p>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US">Is there a way to manually clean or rebuild the nzd database?</span></p>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US"> </span></p>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US">Thanks, Christian</span></p>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;">
<span style="font-size:12.0pt" lang="EN-US"> </span></p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<b><span style="font-size:12.0pt; color:black">From: </span></b><span style="font-size:12.0pt; color:black">"Scott A. Wozny" <sawozny@hotmail.com><br>
<b>Date: </b>Monday, 12. October 2020 at 20:42 <br>
<b>To: </b>"boesch@fhv.at" <boesch@fhv.at>, "bind-users@lists.isc.org" <bind-users@lists.isc.org><br>
<b>Subject: </b>Re: unable to delzone</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
 </p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black">There are a LOT of possibilities why this isn't working.  The first two things I'd check is trying this action again as root (if you're not already) to make sure this action isn't trying something that's DAC prohibited
 and checking the SELinux / AppArmor log (if you're running them) to see if this particular action (it doesn't sound like it's something you do often) is making a system call that's forbidden by the MAC. 
</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black">These are suggestions to see if the issue is at the OS level, of course.  I'm assuming what you're doing is permitted in the application (i.e. the zone you're trying to delete was created with rndc addzone) but you
 haven't provided enough detail to determine that.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black">HTH,</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black">Scott</span></p>
</div>
<div>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt; text-align:center" align="center">
<hr width="100%" size="0" align="center">
</div>
<div id="x_divRplyFwdMsg">
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<b><span style="color:black">From:</span></b><span style="color:black"> bind-users <bind-users-bounces@lists.isc.org> on behalf of BÖSCH Christian <boesch@fhv.at><br>
<b>Sent:</b> October 12, 2020 4:35 AM<br>
<b>To:</b> bind-users@lists.isc.org <bind-users@lists.isc.org><br>
<b>Subject:</b> unable to delzone</span> </p>
<div>
<p class="x_MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
 </p>
</div>
</div>
<div>
<div>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US">Hi,</span><span style="font-size:12.0pt"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US"> </span><span style="font-size:12.0pt"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US">I want to delete a zone with:</span><span style="font-size:12.0pt"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">rndc delzone domain.org</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US"> </span><span style="font-size:12.0pt"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US">In the logfile I get:</span><span style="font-size:12.0pt"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">Oct 12 10:16:30 nsmaster named[669]: general: received control channel command 'delzone domain.org'</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">Oct 12 10:16:30 nsmaster named[669]: general: zone domain.org scheduled for removal via delzone</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">Oct 12 10:16:30 nsmaster named[669]: general: deleting zone domain.org in view _default via delzone</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">Oct 12 10:16:30 nsmaster named[669]: general: mdb_txn_begin: Invalid argument</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">Oct 12 10:16:30 nsmaster named[669]: general: unable to open NZD database for '_default.nzd'</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">Oct 12 10:16:30 nsmaster named[669]: general: unable to delete zone configuration: failure</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt"> </span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US">And so in the nzd db the config remains active:</span><span style="font-size:12.0pt"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">named-nzd2nzf _default.nzd | grep domain.org</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xp1" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span class="x_xs1"><span style="font-size:8.5pt; font-family:Menlo; color:black">zone "domain.org" { type master; file "../dynamic/domain.org"; };</span></span><span style="font-size:8.5pt; font-family:Menlo; color:black"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt"> </span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US">So why can the nzd db not be opened? And how can that be solved?</span><span style="font-size:12.0pt"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US"> </span><span style="font-size:12.0pt"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US">Thanks in advance,</span><span style="font-size:12.0pt"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US">Christian</span><span style="font-size:12.0pt"></span></p>
<p class="x_xmsonormal" style="margin: 0cm; font-size: 11pt; font-family: "Calibri", sans-serif;margin-left:36.0pt">
<span style="font-size:12.0pt" lang="EN-US"> </span><span style="font-size:12.0pt"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>