Getting 'Required token $zone$ not found.' error

George Embrey <[email protected]> Sat, 28 Apr 2018 23:29:26 +1000
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============6493648647410257488==
Content-Type: multipart/alternative;
 boundary="------------E70D9C5804958E21EF40D4C2"
Content-Language: en-US

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

I built bind9-9.11.3 from Debian Sources as follows:

after unpacking the source tarball, i followed these steps:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 
--with-dlz-mysql=yes --enable-threads=no

The results are here:

===============================================================================
Configuration summary:
-------------------------------------------------------------------------------
Optional features enabled:
     GSS-API (--with-gssapi)
     ECDSA algorithm support (--with-ecdsa)
     Print backtrace on crash (--enable-backtrace)
     Use symbol table for backtrace, named only (--enable-symtable)
     Dynamically loadable zone (DLZ) drivers:
         MySQL (--with-dlz-mysql)
-------------------------------------------------------------------------------
Features disabled or unavailable on this platform:
     Multiprocessing support (--enable-threads)
     Large-system tuning (--with-tuning)
     Allow 'dnstap' packet logging (--enable-dnstap)
     GeoIP access control (--with-geoip)
     Allow 'fixed' rrset-order (--enable-fixed-rrset)
     PKCS#11/Cryptoki support (--with-pkcs11)
     Native PKCS#11/Cryptoki support (--enable-native-pkcs11)
     GOST algorithm support (--with-gost)
     EDDSA algorithm support (--with-eddsa)
     Use libseccomp system call filtering (--enable-seccomp)
     Very verbose query trace logging (--enable-querytrace)
     Use GNU libtool (--with-libtool)
     Automated Testing Framework (--with-atf)
-------------------------------------------------------------------------------
Configured paths:
     prefix: /usr
     sysconfdir: /etc
     localstatedir: /var
-------------------------------------------------------------------------------
For more detail, use --enable-full-report.
===============================================================================

All looks good so I ran:

make && make install

In my named.conf.local i have:

dlz "mysql zone" {
    database "mysql
    {host=localhost dbname=bind_dns ssl=false user=binder 
pass=secretPassword}
    {select zone from dns_values where zone = '%zone%'}
    {select ttl, type, mx_priority, case when lower(type)='txt' then 
concat('\"', data, '\"')
         else data end from dns_values where zone = '%zone%' and host = 
'%record%'
         and not (type = 'SOA' or type = 'NS')}
    {select ttl, type, mx_priority, data, resp_person, serial, refresh, 
retry, expire, minimum
         from dns_values where zone = '%zone%' and (type = 'SOA' or 
type='NS')}
    {select ttl, type, host, mx_priority, data, resp_person, serial, 
refresh, retry, expire,
         minimum from dns_values where zone = '%zone%' and not (type = 
'SOA' or type = 'NS')}
    {select zone from xfr_table where zone = '%zone%' and client = 
'%client%'}
    {update data_count set count = count + 1 where zone ='%zone%'}";
};

MySQL Database (all privileges granted to the user 'binder'@'localhost' 
on the bind_dns database).

CREATE TABLE `dns_values` (
   `zone` varchar(255) NOT NULL DEFAULT '',
   `host` varchar(255) NOT NULL DEFAULT '',
   `type` enum('SOA','NS','MX','A','CNAME','TXT','HINFO','PTR') NOT NULL 
DEFAULT 'SOA',
   `data` varchar(255) DEFAULT NULL,
   `ttl` int(11) NOT NULL DEFAULT '300',
   `mx_priority` varchar(10) DEFAULT NULL,
   `refresh` int(11) NOT NULL DEFAULT '0',
   `retry` int(11) NOT NULL DEFAULT '0',
   `expire` int(11) NOT NULL DEFAULT '0',
   `minimum` int(11) NOT NULL DEFAULT '0',
   `serial` bigint(20) NOT NULL DEFAULT '0',
   `resp_person` varchar(255) DEFAULT NULL,
   `primary_ns` varchar(255) DEFAULT NULL,
   KEY `host_index` (`host`),
   KEY `type_index` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

sample data:

INSERT INTO `dns_values` VALUES
('example.com','@','SOA','root.mail.example.com.',300,NULL,10800,900,604800,600,2009020401,'root.mail.example.com.','ns1.example.com.'),
('example.com','@','NS','ns1.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','@','NS','ns2.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','ns1','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','@','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','images','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','mail','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','*','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','imap','CNAME','mail.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','smtp','CNAME','mail.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','@','TXT','v=spf2.0/pra mx ip4:xxx.xxx.xxx.0/24 
-all',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','@','TXT','v=spf1 mx ip4:192.168.1.0/24 
-all',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),
('example.com','@','MX','mail.example.com.',300,'10',10800,900,604800,600,2009020401,NULL,NULL),
('example.com','webmail','CNAME','mail.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL);

sample data in the table:

root@debian9-builds:/usr/src/bind9-9.11.3+dfsg-dlz-mysql# mysql -ubinder 
-psecretPassword bind_dns -e"select * from dns_values where 
zone='example.com'"
mysql: [Warning] Using a password on the command line interface can be 
insecure.
+-------------+---------+-------+-------------------------------------------+-----+-------------+---------+-------+--------+---------+------------+------------------------+------------------+
| zone        | host    | type  | 
data                                      | ttl | mx_priority | refresh 
| retry | expire | minimum | serial     | resp_person            | 
primary_ns       |
+-------------+---------+-------+-------------------------------------------+-----+-------------+---------+-------+--------+---------+------------+------------------------+------------------+
| example.com | @       | SOA   | 
root.mail.example.com.                    | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | root.mail.example.com. | 
ns1.example.com. |
| example.com | @       | NS    | 
ns1.example.com.                          | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | @       | NS    | 
ns2.example.com.                          | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | ns1     | A     | 
192.168.1.103                             | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | @       | A     | 
192.168.1.103                             | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | images  | A     | 
192.168.1.103                             | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | mail    | A     | 
192.168.1.103                             | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | *       | A     | 
192.168.1.103                             | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | imap    | CNAME | 
mail.example.com.                         | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | smtp    | CNAME | 
mail.example.com.                         | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
| example.com | @       | TXT   | v=spf2.0/pra mx ip4:xxx.xxx.xxx.0/24 
-all | 300 | NULL        |   10800 | 900 | 604800 |     600 | 2009020401 
| NULL                   | NULL             |
| example.com | @       | TXT   | v=spf1 mx ip4:192.168.1.0/24 
-all         | 300 | NULL        |   10800 |   900 | 604800 |     600 | 
2009020401 | NULL                   | NULL             |
| example.com | @       | MX    | 
mail.example.com.                         | 300 | 10 |   10800 |   900 | 
604800 |     600 | 2009020401 | NULL                   | NULL             |
| example.com | webmail | CNAME | 
mail.example.com.                         | 300 | NULL |   10800 |   900 
| 604800 |     600 | 2009020401 | NULL                   | 
NULL             |
+-------------+---------+-------+-------------------------------------------+-----+-------------+---------+-------+--------+---------+------------+------------------------+------------------+
14 rows in set (0.00 sec)

Run bind9 named in debug mode:

root@debian9-builds:/usr/src/bind9-9.11.3+dfsg-dlz-mysql# named -d 8 -g 
-n 1 -c /etc/bind/named.conf
28-Apr-2018 21:09:04.636 starting BIND 9.11.3-1-Debian (Extended Support 
Version) <id:a375815>
28-Apr-2018 21:09:04.636 running on Linux x86_64 4.15.0-3-amd64 #1 SMP 
Debian 4.15.17-1 (2018-04-19)
28-Apr-2018 21:09:04.636 built with '--prefix=/usr' '--sysconfdir=/etc' 
'--localstatedir=/var' '--with-dlz-mysql=yes'
28-Apr-2018 21:09:04.636 running as: named -d 8 -g -n 1 -c 
/etc/bind/named.conf
28-Apr-2018 21:09:04.636 
----------------------------------------------------
28-Apr-2018 21:09:04.636 BIND 9 is maintained by Internet Systems 
Consortium,
28-Apr-2018 21:09:04.636 Inc. (ISC), a non-profit 501(c)(3) public-benefit
28-Apr-2018 21:09:04.636 corporation.  Support and training for BIND 9 are
28-Apr-2018 21:09:04.636 available at https://www.isc.org/support
28-Apr-2018 21:09:04.636 
----------------------------------------------------
28-Apr-2018 21:09:04.636 found 2 CPUs, using 1 worker thread
28-Apr-2018 21:09:04.636 using 1 UDP listener per interface
28-Apr-2018 21:09:04.636 using up to 4096 sockets
28-Apr-2018 21:09:04.636 Registering DLZ_dlopen driver
28-Apr-2018 21:09:04.636 Registering SDLZ driver 'dlopen'
28-Apr-2018 21:09:04.636 Registering DLZ driver 'dlopen'
28-Apr-2018 21:09:04.636 Registering DLZ mysql driver.
28-Apr-2018 21:09:04.636 Registering SDLZ driver 'mysql'
28-Apr-2018 21:09:04.636 Registering DLZ driver 'mysql'
28-Apr-2018 21:09:04.645 loading configuration from '/etc/bind/named.conf'
28-Apr-2018 21:09:04.645 reading built-in trust anchors from file 
'/etc/bind.keys'
28-Apr-2018 21:09:04.646 set maximum stack size to 18446744073709551615: 
success
28-Apr-2018 21:09:04.646 set maximum data size to 18446744073709551615: 
success
28-Apr-2018 21:09:04.646 set maximum core size to 18446744073709551615: 
success
28-Apr-2018 21:09:04.646 set maximum open files to 18446744073709551615: 
success
28-Apr-2018 21:09:04.646 using default UDP/IPv4 port range: [32768, 60999]
28-Apr-2018 21:09:04.646 using default UDP/IPv6 port range: [32768, 60999]
28-Apr-2018 21:09:04.647 listening on IPv6 interfaces, port 53
28-Apr-2018 21:09:04.647 clientmgr @0x7f45c7a2c010: create
28-Apr-2018 21:09:04.663 clientmgr @0x7f45c7a2c010: createclients
28-Apr-2018 21:09:04.664 clientmgr @0x7f45c7a2c010: get client
28-Apr-2018 21:09:04.664 clientmgr @0x7f45c7a2c010: create new
28-Apr-2018 21:09:04.664 clientmgr @0x7f45c7a2c010: clientmctx
28-Apr-2018 21:09:04.665 client @0x7f45bc038c50 (no-peer): create
28-Apr-2018 21:09:04.665 clientmgr @0x7f45c7a2c010: createclients
28-Apr-2018 21:09:04.665 clientmgr @0x7f45c7a2c010: get client
28-Apr-2018 21:09:04.665 clientmgr @0x7f45c7a2c010: create new
28-Apr-2018 21:09:04.666 clientmgr @0x7f45c7a2c010: clientmctx
28-Apr-2018 21:09:04.666 client @0x7f45bc03e8b0 (no-peer): create
28-Apr-2018 21:09:04.667 listening on IPv4 interface lo, 127.0.0.1#53
28-Apr-2018 21:09:04.667 clientmgr @0x7f45c7a2c458: create
28-Apr-2018 21:09:04.667 clientmgr @0x7f45c7a2c458: createclients
28-Apr-2018 21:09:04.668 clientmgr @0x7f45c7a2c458: get client
28-Apr-2018 21:09:04.668 clientmgr @0x7f45c7a2c458: create new
28-Apr-2018 21:09:04.668 clientmgr @0x7f45c7a2c458: clientmctx
28-Apr-2018 21:09:04.668 client @0x7f45bc0422a0 (no-peer): create
28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458: createclients
28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458: get client
28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458: create new
28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458: clientmctx
28-Apr-2018 21:09:04.670 client @0x7f45bc0af230 (no-peer): create
28-Apr-2018 21:09:04.670 listening on IPv4 interface enp0s3, 
192.168.1.103#53
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: create
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: createclients
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: get client
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: create new
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: clientmctx
28-Apr-2018 21:09:04.670 client @0x7f45bc0bdef0 (no-peer): create
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: createclients
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: get client
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: create new
28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: clientmctx
28-Apr-2018 21:09:04.671 client @0x7f45bc0cc670 (no-peer): create
28-Apr-2018 21:09:04.671 generating session key for dynamic DNS
28-Apr-2018 21:09:04.671 sizing zone task pool based on 5 zones
28-Apr-2018 21:09:04.672 zone_settimer: zone localhost/IN: enter
28-Apr-2018 21:09:04.672 zone_settimer: zone 127.in-addr.arpa/IN: enter
28-Apr-2018 21:09:04.672 zone_settimer: zone 0.in-addr.arpa/IN: enter
28-Apr-2018 21:09:04.672 zone_settimer: zone 255.in-addr.arpa/IN: enter
28-Apr-2018 21:09:04.672 Loading 'mysql zone' using driver mysql
28-Apr-2018 21:09:04.672 Loading SDLZ driver.
*28-Apr-2018 21:09:04.672 Required token $zone$ not found.*
28-Apr-2018 21:09:04.672 Could not build all nodes query list
28-Apr-2018 21:09:04.672 mysql driver could not create database instance 
object.
28-Apr-2018 21:09:04.672 SDLZ driver failed to load.
28-Apr-2018 21:09:04.672 DLZ driver failed to load.
28-Apr-2018 21:09:04.673 load_configuration: failure
28-Apr-2018 21:09:04.673 loading configuration: failure
28-Apr-2018 21:09:04.673 exiting (due to fatal error)

So it comes down to the Required token $zone$ not found error ...

Has anybody found a fix to this issue?

Regards



--------------E70D9C5804958E21EF40D4C2
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I built bind9-9.11.3 from Debian Sources as follows:</p>
    <p>after unpacking the source tarball, i followed these steps:</p>
    <p><font size="+1"><tt>./configure --prefix=/usr --sysconfdir=/etc
          --localstatedir=/var --with-dlz-mysql=yes --enable-threads=no</tt><tt><br>
        </tt></font></p>
    <p>The results are here:</p>
    <p><font size="+1"><tt>===============================================================================</tt><tt><br>
        </tt><tt>Configuration summary:</tt><tt><br>
        </tt><tt>-------------------------------------------------------------------------------</tt><tt><br>
        </tt><tt>Optional features enabled:</tt><tt><br>
        </tt><tt>    GSS-API (--with-gssapi)</tt><tt><br>
        </tt><tt>    ECDSA algorithm support (--with-ecdsa)</tt><tt><br>
        </tt><tt>    Print backtrace on crash (--enable-backtrace)</tt><tt><br>
        </tt><tt>    Use symbol table for backtrace, named only
          (--enable-symtable)</tt><tt><br>
        </tt><tt>    Dynamically loadable zone (DLZ) drivers:</tt><tt><br>
        </tt><tt>        MySQL (--with-dlz-mysql)</tt><tt><br>
        </tt><tt>-------------------------------------------------------------------------------</tt><tt><br>
        </tt><tt>Features disabled or unavailable on this platform:</tt><tt><br>
        </tt><tt>    Multiprocessing support (--enable-threads)</tt><tt><br>
        </tt><tt>    Large-system tuning (--with-tuning)</tt><tt><br>
        </tt><tt>    Allow 'dnstap' packet logging (--enable-dnstap)</tt><tt><br>
        </tt><tt>    GeoIP access control (--with-geoip)</tt><tt><br>
        </tt><tt>    Allow 'fixed' rrset-order (--enable-fixed-rrset)</tt><tt><br>
        </tt><tt>    PKCS#11/Cryptoki support (--with-pkcs11)</tt><tt><br>
        </tt><tt>    Native PKCS#11/Cryptoki support
          (--enable-native-pkcs11)</tt><tt><br>
        </tt><tt>    GOST algorithm support (--with-gost)</tt><tt><br>
        </tt><tt>    EDDSA algorithm support (--with-eddsa)</tt><tt><br>
        </tt><tt>    Use libseccomp system call filtering
          (--enable-seccomp)</tt><tt><br>
        </tt><tt>    Very verbose query trace logging
          (--enable-querytrace)</tt><tt><br>
        </tt><tt>    Use GNU libtool (--with-libtool)</tt><tt><br>
        </tt><tt>    Automated Testing Framework (--with-atf)</tt><tt><br>
        </tt><tt>-------------------------------------------------------------------------------</tt><tt><br>
        </tt><tt>Configured paths:</tt><tt><br>
        </tt><tt>    prefix: /usr</tt><tt><br>
        </tt><tt>    sysconfdir: /etc</tt><tt><br>
        </tt><tt>    localstatedir: /var</tt><tt><br>
        </tt><tt>-------------------------------------------------------------------------------</tt><tt><br>
        </tt><tt>For more detail, use --enable-full-report.</tt><tt><br>
        </tt><tt>===============================================================================</tt></font><br>
    </p>
    <p>All looks good so I ran:</p>
    <p><font size="+1"><tt>make &amp;&amp; make install</tt></font></p>
    <p>In my named.conf.local i have:</p>
    <p>dlz "mysql zone" {<br>
         database "mysql<br>
         {host=localhost dbname=bind_dns ssl=false user=binder
      pass=secretPassword}<br>
         {select zone from dns_values where zone = '%zone%'}<br>
         {select ttl, type, mx_priority, case when lower(type)='txt'
      then concat('\"', data, '\"')<br>
              else data end from dns_values where zone = '%zone%' and
      host = '%record%'<br>
              and not (type = 'SOA' or type = 'NS')}<br>
         {select ttl, type, mx_priority, data, resp_person, serial,
      refresh, retry, expire, minimum<br>
              from dns_values where zone = '%zone%' and (type = 'SOA' or
      type='NS')}<br>
         {select ttl, type, host, mx_priority, data, resp_person,
      serial, refresh, retry, expire,<br>
              minimum from dns_values where zone = '%zone%' and not
      (type = 'SOA' or type = 'NS')}<br>
         {select zone from xfr_table where zone = '%zone%' and client =
      '%client%'}<br>
         {update data_count set count = count + 1 where zone
      ='%zone%'}";<br>
      };<br>
    </p>
    <p>MySQL Database (all privileges granted to the user
      'binder'@'localhost' on the bind_dns database).</p>
    <font size="+1"><tt>CREATE TABLE `dns_values` (</tt></font><font
      size="+1"><tt><br>
          `zone` varchar(255) NOT NULL DEFAULT '',</tt></font><font
      size="+1"><tt><br>
          `host` varchar(255) NOT NULL DEFAULT '',</tt></font><font
      size="+1"><tt><br>
          `type` enum('SOA','NS','MX','A','CNAME','TXT','HINFO','PTR')
        NOT NULL DEFAULT 'SOA',</tt></font><font size="+1"><tt><br>
          `data` varchar(255) DEFAULT NULL,</tt></font><font size="+1"><tt><br>
          `ttl` int(11) NOT NULL DEFAULT '300',</tt></font><font
      size="+1"><tt><br>
          `mx_priority` varchar(10) DEFAULT NULL,</tt></font><font
      size="+1"><tt><br>
          `refresh` int(11) NOT NULL DEFAULT '0',</tt></font><font
      size="+1"><tt><br>
          `retry` int(11) NOT NULL DEFAULT '0',</tt></font><font
      size="+1"><tt><br>
          `expire` int(11) NOT NULL DEFAULT '0',</tt></font><font
      size="+1"><tt><br>
          `minimum` int(11) NOT NULL DEFAULT '0',</tt></font><font
      size="+1"><tt><br>
          `serial` bigint(20) NOT NULL DEFAULT '0',</tt></font><font
      size="+1"><tt><br>
          `resp_person` varchar(255) DEFAULT NULL,</tt></font><font
      size="+1"><tt><br>
          `primary_ns` varchar(255) DEFAULT NULL,</tt></font><font
      size="+1"><tt><br>
          KEY `host_index` (`host`),</tt></font><font size="+1"><tt><br>
          KEY `type_index` (`type`)</tt></font><font size="+1"><tt><br>
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8;</tt></font><br>
    <br>
    <font size="+1"><tt>sample data:</tt></font>
    <p><font size="+1"><tt>INSERT INTO `dns_values` VALUES<br>
('example.com','@','SOA','root.mail.example.com.',300,NULL,10800,900,604800,600,2009020401,'root.mail.example.com.','ns1.example.com.'),<br>
('example.com','@','NS','ns1.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','@','NS','ns2.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','ns1','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','@','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','images','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','mail','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','*','A','192.168.1.103',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','imap','CNAME','mail.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','smtp','CNAME','mail.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
          ('example.com','@','TXT','v=spf2.0/pra mx ip4:xxx.xxx.xxx.0/24
          -all',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
          ('example.com','@','TXT','v=spf1 mx ip4:192.168.1.0/24
          -all',300,NULL,10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','@','MX','mail.example.com.',300,'10',10800,900,604800,600,2009020401,NULL,NULL),<br>
('example.com','webmail','CNAME','mail.example.com.',300,NULL,10800,900,604800,600,2009020401,NULL,NULL);</tt></font></p>
    <p><font size="+1"><tt>sample data in the table:</tt></font></p>
    <p><font size="+1"><tt><a class="moz-txt-link-abbreviated"
            href="mailto:root@debian9-builds:/usr/src/bind9-9.11.3+dfsg-dlz-mysql#">root@debian9-builds:/usr/src/bind9-9.11.3+dfsg-dlz-mysql#</a>
          mysql -ubinder -psecretPassword bind_dns -e"select * from
          dns_values where zone='example.com'"<br>
          mysql: [Warning] Using a password on the command line
          interface can be insecure.<br>
+-------------+---------+-------+-------------------------------------------+-----+-------------+---------+-------+--------+---------+------------+------------------------+------------------+<br>
          | zone        | host    | type  |
          data                                      | ttl | mx_priority
          | refresh | retry | expire | minimum | serial     |
          resp_person            | primary_ns       |<br>
+-------------+---------+-------+-------------------------------------------+-----+-------------+---------+-------+--------+---------+------------+------------------------+------------------+<br>
          | example.com | @       | SOA   |
          root.mail.example.com.                    | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          root.mail.example.com. | ns1.example.com. |<br>
          | example.com | @       | NS    |
          ns1.example.com.                          | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | @       | NS    |
          ns2.example.com.                          | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | ns1     | A     |
          192.168.1.103                             | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | @       | A     |
          192.168.1.103                             | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | images  | A     |
          192.168.1.103                             | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | mail    | A     |
          192.168.1.103                             | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | *       | A     |
          192.168.1.103                             | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | imap    | CNAME |
          mail.example.com.                         | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | smtp    | CNAME |
          mail.example.com.                         | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | @       | TXT   | v=spf2.0/pra mx
          ip4:xxx.xxx.xxx.0/24 -all | 300 | NULL        |   10800 |  
          900 | 604800 |     600 | 2009020401 | NULL                   |
          NULL             |<br>
          | example.com | @       | TXT   | v=spf1 mx ip4:192.168.1.0/24
          -all         | 300 | NULL        |   10800 |   900 | 604800
          |     600 | 2009020401 | NULL                   |
          NULL             |<br>
          | example.com | @       | MX    |
          mail.example.com.                         | 300 | 10         
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
          | example.com | webmail | CNAME |
          mail.example.com.                         | 300 | NULL       
          |   10800 |   900 | 604800 |     600 | 2009020401 |
          NULL                   | NULL             |<br>
+-------------+---------+-------+-------------------------------------------+-----+-------------+---------+-------+--------+---------+------------+------------------------+------------------+<br>
          14 rows in set (0.00 sec)<br>
        </tt></font></p>
    <p><font size="+1"><tt>Run bind9 named in debug mode:</tt></font></p>
    <p><font size="+1"><tt><a class="moz-txt-link-abbreviated"
            href="mailto:root@debian9-builds:/usr/src/bind9-9.11.3+dfsg-dlz-mysql#">root@debian9-builds:/usr/src/bind9-9.11.3+dfsg-dlz-mysql#</a>
          named -d 8 -g -n 1 -c /etc/bind/named.conf<br>
          28-Apr-2018 21:09:04.636 starting BIND 9.11.3-1-Debian
          (Extended Support Version) &lt;id:a375815&gt;<br>
          28-Apr-2018 21:09:04.636 running on Linux x86_64
          4.15.0-3-amd64 #1 SMP Debian 4.15.17-1 (2018-04-19)<br>
          28-Apr-2018 21:09:04.636 built with '--prefix=/usr'
          '--sysconfdir=/etc' '--localstatedir=/var'
          '--with-dlz-mysql=yes'<br>
          28-Apr-2018 21:09:04.636 running as: named -d 8 -g -n 1 -c
          /etc/bind/named.conf<br>
          28-Apr-2018 21:09:04.636
          ----------------------------------------------------<br>
          28-Apr-2018 21:09:04.636 BIND 9 is maintained by Internet
          Systems Consortium,<br>
          28-Apr-2018 21:09:04.636 Inc. (ISC), a non-profit 501(c)(3)
          public-benefit <br>
          28-Apr-2018 21:09:04.636 corporation.  Support and training
          for BIND 9 are <br>
          28-Apr-2018 21:09:04.636 available at <a
            class="moz-txt-link-freetext"
            href="https://www.isc.org/support">https://www.isc.org/support</a><br>
          28-Apr-2018 21:09:04.636
          ----------------------------------------------------<br>
          28-Apr-2018 21:09:04.636 found 2 CPUs, using 1 worker thread<br>
          28-Apr-2018 21:09:04.636 using 1 UDP listener per interface<br>
          28-Apr-2018 21:09:04.636 using up to 4096 sockets<br>
          28-Apr-2018 21:09:04.636 Registering DLZ_dlopen driver<br>
          28-Apr-2018 21:09:04.636 Registering SDLZ driver 'dlopen'<br>
          28-Apr-2018 21:09:04.636 Registering DLZ driver 'dlopen'<br>
          28-Apr-2018 21:09:04.636 Registering DLZ mysql driver.<br>
          28-Apr-2018 21:09:04.636 Registering SDLZ driver 'mysql'<br>
          28-Apr-2018 21:09:04.636 Registering DLZ driver 'mysql'<br>
          28-Apr-2018 21:09:04.645 loading configuration from
          '/etc/bind/named.conf'<br>
          28-Apr-2018 21:09:04.645 reading built-in trust anchors from
          file '/etc/bind.keys'<br>
          28-Apr-2018 21:09:04.646 set maximum stack size to
          18446744073709551615: success<br>
          28-Apr-2018 21:09:04.646 set maximum data size to
          18446744073709551615: success<br>
          28-Apr-2018 21:09:04.646 set maximum core size to
          18446744073709551615: success<br>
          28-Apr-2018 21:09:04.646 set maximum open files to
          18446744073709551615: success<br>
          28-Apr-2018 21:09:04.646 using default UDP/IPv4 port range:
          [32768, 60999]<br>
          28-Apr-2018 21:09:04.646 using default UDP/IPv6 port range:
          [32768, 60999]<br>
          28-Apr-2018 21:09:04.647 listening on IPv6 interfaces, port 53<br>
          28-Apr-2018 21:09:04.647 clientmgr @0x7f45c7a2c010: create<br>
          28-Apr-2018 21:09:04.663 clientmgr @0x7f45c7a2c010:
          createclients<br>
          28-Apr-2018 21:09:04.664 clientmgr @0x7f45c7a2c010: get client<br>
          28-Apr-2018 21:09:04.664 clientmgr @0x7f45c7a2c010: create new<br>
          28-Apr-2018 21:09:04.664 clientmgr @0x7f45c7a2c010: clientmctx<br>
          28-Apr-2018 21:09:04.665 client @0x7f45bc038c50 (no-peer):
          create<br>
          28-Apr-2018 21:09:04.665 clientmgr @0x7f45c7a2c010:
          createclients<br>
          28-Apr-2018 21:09:04.665 clientmgr @0x7f45c7a2c010: get client<br>
          28-Apr-2018 21:09:04.665 clientmgr @0x7f45c7a2c010: create new<br>
          28-Apr-2018 21:09:04.666 clientmgr @0x7f45c7a2c010: clientmctx<br>
          28-Apr-2018 21:09:04.666 client @0x7f45bc03e8b0 (no-peer):
          create<br>
          28-Apr-2018 21:09:04.667 listening on IPv4 interface lo,
          127.0.0.1#53<br>
          28-Apr-2018 21:09:04.667 clientmgr @0x7f45c7a2c458: create<br>
          28-Apr-2018 21:09:04.667 clientmgr @0x7f45c7a2c458:
          createclients<br>
          28-Apr-2018 21:09:04.668 clientmgr @0x7f45c7a2c458: get client<br>
          28-Apr-2018 21:09:04.668 clientmgr @0x7f45c7a2c458: create new<br>
          28-Apr-2018 21:09:04.668 clientmgr @0x7f45c7a2c458: clientmctx<br>
          28-Apr-2018 21:09:04.668 client @0x7f45bc0422a0 (no-peer):
          create<br>
          28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458:
          createclients<br>
          28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458: get client<br>
          28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458: create new<br>
          28-Apr-2018 21:09:04.669 clientmgr @0x7f45c7a2c458: clientmctx<br>
          28-Apr-2018 21:09:04.670 client @0x7f45bc0af230 (no-peer):
          create<br>
          28-Apr-2018 21:09:04.670 listening on IPv4 interface enp0s3,
          192.168.1.103#53<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: create<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0:
          createclients<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: get client<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: create new<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: clientmctx<br>
          28-Apr-2018 21:09:04.670 client @0x7f45bc0bdef0 (no-peer):
          create<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0:
          createclients<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: get client<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: create new<br>
          28-Apr-2018 21:09:04.670 clientmgr @0x7f45c7a2c8a0: clientmctx<br>
          28-Apr-2018 21:09:04.671 client @0x7f45bc0cc670 (no-peer):
          create<br>
          28-Apr-2018 21:09:04.671 generating session key for dynamic
          DNS<br>
          28-Apr-2018 21:09:04.671 sizing zone task pool based on 5
          zones<br>
          28-Apr-2018 21:09:04.672 zone_settimer: zone localhost/IN:
          enter<br>
          28-Apr-2018 21:09:04.672 zone_settimer: zone
          127.in-addr.arpa/IN: enter<br>
          28-Apr-2018 21:09:04.672 zone_settimer: zone
          0.in-addr.arpa/IN: enter<br>
          28-Apr-2018 21:09:04.672 zone_settimer: zone
          255.in-addr.arpa/IN: enter<br>
          28-Apr-2018 21:09:04.672 Loading 'mysql zone' using driver
          mysql<br>
          28-Apr-2018 21:09:04.672 Loading SDLZ driver.<br>
          <font size="+2"><b>28-Apr-2018 21:09:04.672 Required token
              $zone$ not found.</b></font><br>
          28-Apr-2018 21:09:04.672 Could not build all nodes query list<br>
          28-Apr-2018 21:09:04.672 mysql driver could not create
          database instance object.<br>
          28-Apr-2018 21:09:04.672 SDLZ driver failed to load.<br>
          28-Apr-2018 21:09:04.672 DLZ driver failed to load.<br>
          28-Apr-2018 21:09:04.673 load_configuration: failure<br>
          28-Apr-2018 21:09:04.673 loading configuration: failure<br>
          28-Apr-2018 21:09:04.673 exiting (due to fatal error)</tt></font></p>
    <p><font size="+1"><tt>So it comes down to the Required token $zone$
          not found error ...</tt></font></p>
    <p><font size="+1"><tt>Has anybody found a fix to this issue?</tt></font></p>
    <p><font size="+1"><tt>Regards<br>
        </tt></font></p>
    <p><font size="+1"><tt><br>
        </tt></font></p>
  </body>
</html>

--------------E70D9C5804958E21EF40D4C2--


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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============6493648647410257488==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Bind-dlz-testers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers

--===============6493648647410257488==--