dns_rdata_fromtext: buffer-0xb7f1ab44:1: near eof: unexpected end of input
Agnello George
agnello.dsouza at gmail.com
Fri Nov 16 09:43:45 UTC 2007
! have installed bind- dlz 9.5 on FC7 and tryin to do a test on the local
network to check if my DNS server works. My test DNS server IP address is
192.168.0.244 and i ahve created a zone sample.com whoes A recprd should
point to 192.168.0.247 ( anthotehr machne on my net work running apache )
I am able to start bind with out much problem
[root at bind ~]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root at bind ~]
Also ran a command that a friend guided me ( pawel Tobis )
[root at bind ~]# named-checkconf && echo "OK" || echo "Failure"
OK
here are the logs after i start bind
[root at bind ~]# tail -f /var/log/messages
Nov 16 20:26:39 bind named[5783]: automatic empty zone:
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Nov 16 20:26:39 bind named[5783]: automatic empty zone:
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Nov 16 20:26:39 bind named[5783]: automatic empty zone: D.F.IP6.ARPA
Nov 16 20:26:39 bind named[5783]: automatic empty zone: 8.E.F.IP6.ARPA
Nov 16 20:26:39 bind named[5783]: automatic empty zone: 9.E.F.IP6.ARPA
Nov 16 20:26:39 bind named[5783]: automatic empty zone: A.E.F.IP6.ARPA
Nov 16 20:26:39 bind named[5783]: automatic empty zone: B.E.F.IP6.ARPA
Nov 16 20:26:39 bind named[5783]: command channel listening on 127.0.0.1#953
Nov 16 20:26:39 bind named[5783]: command channel listening on ::1#953
Nov 16 20:26:39 bind named[5783]: running
now when i try to do a nslookup for sample .com i get the following error :
[root at bind ~]# nslookup sample.com
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find sample.com: NXDOMAIN
here is the log after i ran nslookup ( error )
[root at bind ~]# tail -f /var/log/messages
Nov 16 20:26:39 bind named[5783]: command channel listening on 127.0.0.1#953
Nov 16 20:26:39 bind named[5783]: command channel listening on ::1#953
Nov 16 20:26:39 bind named[5783]: running
Nov 16 20:27:26 bind named[5783]: dns_rdata_fromtext: buffer-0xb7f1ab44:1:
near eof: unexpected end of input
Nov 16 20:27:26 bind named[5783]: dns_sdlz_putrr returned error. Error code
was: unexpected end of input
Nov 16 20:27:26 bind named[5783]: dns_rdata_fromtext: buffer-0xb7f1a864:1:
near eof: unexpected end of input
Nov 16 20:27:26 bind named[5783]: dns_sdlz_putrr returned error. Error code
was: unexpected end of input
Nov 16 20:27:26 bind named[5783]: checkhints:
L.ROOT-SERVERS.NET/A<http://l.root-servers.net/A>(
199.7.83.42) missing from hints
Nov 16 20:27:27 bind named[5783]: checkhints: L.ROOT-SERVERS.NET/A
<http://l.root-servers.net/A>(198.32.64.12) extra record in hints
Nov 16 20:27:29 bind named[5783]: too many timeouts resolving '
sample.com.testserver.com/A ' (in 'testserver.com'?): disabling EDNS
Here is few infomation about my system :
[root at bind ~]# hostname
bind.testserver.com
[root at bind ~]# cat /etc/resolv.conf
search testserver.com
#nameserver 203.199.113.27
#nameserver 203.199.113.44
nameserver 127.0.0.1
my /etc/named.conf looks like this :
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var";
pid-file "/var/run/named/named.pid";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;
};
logging {
channel default_debug {
file "named/data/named.run";
severity dynamic;
};
};
dlz "Mysql zone" {
database "mysql
{host=127.0.0.1 dbname=binddlzdb user=binddlzuser pass=binddlzpassword
ssl=tRue}
{select zone from records where zone = '%zone%'}
{select ttl, type, mx_priority, case when lower(type)='txt' then
concat('\"', data, '\"')
else data end from records where zone = '%zone%' and host =
'%record%'
and not (type = 'SOA' or type = 'NS')}
{select ttl, type, mx_priority, data, resp_contact, serial, refresh, retry,
expire, minimum
from records where zone = '%zone%' and (type = 'SOA' or type='NS')}
{select ttl, type, host, mx_priority, data, resp_contact, serial, refresh,
retry, expire,
minimum from records where zone = '%zone%' and not (type = 'SOA' or
type = 'NS')}
{select zone from xfr where zone = '%zone%' and client = '%client%'}
{update data_count set count = count + 1 where zone ='%zone%'}";
##############################
my : records" tabel looks like this :
mysql> select * from records;
+-----+------------+-----+------+------+-------------+-------------------------+-------------------------+------------------------------+------------+---------+-------+--------+---------+
| id | zone | ttl | type | host | mx_priority |
data | primary_ns |
resp_contact | serial | refresh | retry | expire |
minimum |
+-----+------------+-----+------+------+-------------+-------------------------+-------------------------+------------------------------+------------+---------+-------+--------+---------+
| 100 | sample.com | 360 | SOA | @ | NULL |
NULL | ns1.bind.testserver.com |
hostname.bind.testserver.com | 2007111401 | 10080 | 7200 | 604800 |
86400 |
| 101 | sample.com | 360 | NS | @ | NULL |
ns1.bind.testserver.com | NULL |
NULL | NULL | NULL | NULL | NULL |
NULL |
| 102 | sample.com | 360 | MX | @ | 10 | mail.sample.com
| NULL | NULL | NULL |
NULL | NULL | NULL | NULL |
| 104 | sample.com | 360 | A | www | NULL | 192.168.0.247
| NULL | NULL | NULL |
NULL | NULL | NULL | NULL |
| 105 | sample.com | 360 | A | ns1 | NULL | 192.168.0.244
| NULL | NULL | NULL |
NULL | NULL | NULL | NULL |
| 106 | sample.com | 360 | A | mail | NULL | 192.168.0.247
| NULL | NULL | NULL |
NULL | NULL | NULL | NULL |
| 107 | sample.com | 360 | A | @ | NULL | 192.168.0.247
| NULL | NULL | NULL |
NULL | NULL | NULL | NULL |
+-----+------------+-----+------+------+-------------+-------------------------+-------------------------+------------------------------+------------+---------+-------+--------+---------+
7 rows in set (0.00 sec)
Is there a problem with the query that i am running ?? Is there a way to
check manually wheather each query works ??
Is my resolv.conf file correct ?
thanks for all the help !!!
--
Agnello . G .Dsouza
More information about the bind-users
mailing list