BIND 9.7.1 with dlz(mysql)

Mark Andrews marka at isc.org
Wed Jun 30 02:42:06 UTC 2010


In message <201006301020006377900 at 114.com.cn>, "ShanyiWan" writes:
> Cent OS 5.4(32bit) +mysql 5.1.48
> 
> # /usr/local/bind/sbin/named -c /usr/local/bind/etc/named.conf -u named -g -d
>  1 
> 30-Jun-2010 10:16:39.071 starting BIND 9.7.1 -c /usr/local/bind/etc/named.con
> f -u named -g -d 1
> 30-Jun-2010 10:16:39.071 built with '--prefix=/usr/local/bind' '--with-dlz-my
> sql=/usr/local/mysql' '--enable-threads=no' '--enable-largefile'
> 30-Jun-2010 10:16:39.071 using up to 4096 sockets
> 30-Jun-2010 10:16:39.077 loading configuration from '/usr/local/bind/etc/name
> d.conf'
> 30-Jun-2010 10:16:39.078 reading built-in trusted keys from file '/usr/local/
> bind/etc/bind.keys'
> 30-Jun-2010 10:16:39.079 using default UDP/IPv4 port range: [1024, 65535]
> 30-Jun-2010 10:16:39.080 using default UDP/IPv6 port range: [1024, 65535]
> 30-Jun-2010 10:16:39.081 listening on IPv4 interface lo, 127.0.0.1#53
> 30-Jun-2010 10:16:39.082 listening on IPv4 interface eth0, 192.168.146.155#53
> 30-Jun-2010 10:16:39.082 generating session key for dynamic DNS
> 30-Jun-2010 10:16:39.082 Loading 'Mysql zone' using driver mysql
> 30-Jun-2010 10:16:39.082 Required token $zone$ not found.
> 30-Jun-2010 10:16:39.082 Could not build find zone query list
> 30-Jun-2010 10:16:39.082 mysql driver could not create database instance obje
> ct.
> Segmentation fault

Run it under the debugger and find out where it failed

e.g.
gdb /usr/local/bind/sbin/named
run -c /usr/local/bind/etc/named.conf -u named -g -d  1
bt
 
> named.conf :
> options {
>         directory "/usr/local/bind/";
>         allow-query { any; };
>         allow-query-cache { any; };
>         recursion no;
>         pid-file "var/run/named.pid";
> };
> 
> logging
> {
>         channel query_log
>         {
>                 file "query.log" versions 3 size 20m;
>                 severity info;
>                 print-time yes;
>                 print-category  yes;
>         };
>         category queries
>         {
>                 query_log;
>         };
> };
> controls {
>         inet 127.0.0.1 port 953
>                 allow { 127.0.0.1; } keys { "rndc-key"; };
> };
> dlz "Mysql zone" {
>    database "mysql
>    {host=localhost dbname=mydns_data ssl=false ssl=false port=3306 user=root 
> pass=password}
>    {select zone from dns_records where zone = '%zone%'}
>    {select ttl, type, mx_priority, case when lower(type)='txt' then concat('\
> "', data, '\"')
>         when lower(type) = 'soa' then concat_ws(' ', data, resp_person, seria
> l, refresh, retry, expire, minimum)
>         else data end from dns_records where zone = '%zone%' and host = '%rec
> ord%'}";
> };
> include "etc/rndc.key";
> 
> --------------
> ShanyiWan
> 2010-06-30
> 
> _______________________________________________
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org



More information about the bind-users mailing list