- 论坛徽章:
- 0
|
安装什么都是正常的,启动也是没有问题的,但是运行一段时间后连接MYSQL数据库的进程就没有掉了,也没有什么日志,只是在BIND的日志有这样的一句
17-Oct-2007 12:24:13.587 client: client @0xb56dd130: udprecv
17-Oct-2007 12:24:13.587 database: mysql driver unable to return result set for findzone query
出现这个总是生新reload一下又是正常了,查询什么的都是可以的,但过了一段时间后又会出现这样的问题,不能连接MYSQL ,这个时间不是固定的
BIND的版本是9.4.1-P1
named.conf如下:
- options {
- listen-on port 53 { 127.0.0.1;192.168.0.8; };
- directory "/var/named";
- dump-file "/var/named/data/cache_dump.db";
- statistics-file "/var/named/data/named_stats.txt";
- memstatistics-file "/var/named/data/named_mem_stats.txt";
- allow-query { any; };
- //recursion no;
- allow-query-cache { none; };
- allow-recursion { none; };
- datasize 2098;
- //auth-nxdomain no;
- };
- controls {
- inet 127.0.0.1 allow { localhost; } keys { rndckey; };
- };
- logging {
- channel default_debug {
- file "data/named.run";
- severity dynamic;
- print-time yes;
- print-category yes;
- };
- category queries {
- default_debug;
- };
- category queries {
- default_debug;
- };
- category config {
- default_debug;
- };
- category database {
- default_debug;
- };
- };
- include "/etc/cnc.ip";
- include "/etc/view.conf";
- include "/etc/rndc.key";
复制代码
view.conf的内容如下:
- view "cnc_view" {
- match-clients{ CNC; };
- //recursion no;
- allow-query-cache { none; };
- allow-recursion { none; };
- zone "." IN {
- type hint;
- file "named.ca";
- };
- include "/etc/named.rfc1912.zones";
- dlz "cnc_view" {
- database "mysql
- {host=127.0.0.1 port=3306 dbname=dns user=dns pass=****}
- {SELECT zone FROM chinacnc_records WHERE zone = '%zone%'}
- {SELECT ttl, type, mx_priority, CASE WHEN lower(type)='txt' THEN '\"' || data || '\"' ELSE data END FROM chinacnc_re
- cords WHERE zone = '%zone%' AND host = '%record%' AND NOT (type = 'SOA' OR type = 'NS')}
- {SELECT ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinacnc_records WHERE z
- one = '%zone%' and (type = 'SOA' or type='NS')}
- {SELECT ttl, type, host, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinacnc_records W
- HERE zone = '%zone%'}
- {select zone from chinacnc_xfr_table where zone = '%zone%' and client = '%client%'}
- {update chinacnc_count set count = count + 1 where zone ='%zone%'}";
- };
- };
- //
- //chinanet and other view
- //
- view "chinanet_other_view" {
- match-clients{ any; };
- //recursion no;
- allow-query-cache { none; };
- allow-recursion { none; };
-
- zone "." IN {
- type hint;
- file "named.ca";
- };
- include "/etc/named.rfc1912.zones";
- dlz "chinanet_other_view" {
- database "mysql
- {host=127.0.0.1 port=3306 dbname=dns user=dns pass=*****}
- {SELECT zone FROM chinanet_records WHERE zone = '%zone%'}
- {SELECT ttl, type, mx_priority, CASE WHEN lower(type)='txt' THEN '\"' || data || '\"' ELSE data END FROM chinanet_re
- cords WHERE zone = '%zone%' AND host = '%record%' AND NOT (type = 'SOA' OR type = 'NS')}
- {SELECT ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinanet_records WHERE z
- one = '%zone%' and (type = 'SOA' or type='NS')}
- {SELECT ttl, type, host, mx_priority, data, contact, serial, refresh, retry, expire, minimum FROM chinanet_records W
- HERE zone = '%zone%'}
- {select zone from chinanet_xfr_table where zone = '%zone%' and client = '%client%'}
- {update chinanet_count set count = count + 1 where zone ='%zone%'}";
- };
- };
复制代码
请大家帮偶看看是什么问题。
先谢谢大家了
[ 本帖最后由 lzylwy 于 2007-10-17 12:52 编辑 ] |
|