Hello,
Queries using the system default nameservers work for me.
Can anyone tell me what I am doing wrong because this fails?
(venv)$ python
Python 2.5.4 (r254:67916, Apr 4 2009, 17:56:17)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dns
>>> from dns import resolver
>>> r = resolver.Resolver('', False)
>>> r.nameservers = ['10.0.0.120']
>>> r.port = 8054
>>> r.query('hostname.test-domain.com', 1, 1, True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/tmu/venv/lib/python2.5/site-packages/dns/resolver.py",
line 668, in query
answer = Answer(qname, rdtype, rdclass, response)
File "/home/tmu/venv/lib/python2.5/site-packages/dns/resolver.py",
line 121, in __init__
raise NoAnswer
dns.resolver.NoAnswer
while this works, on the same machine:
(venv)$ dig @10.0.0.120 -p 8054 hostname.test-domain.com
; <<>> DiG 9.5.1-P2 <<>> @10.0.0.120 -p 8054 hostname.test-domain.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58512
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;hostname.test-domain.com. IN A
;; ANSWER SECTION:
hostname.test-domain.com. 86400 IN A 10.9.8.99
;; Query time: 1 msec
;; SERVER: 10.0.0.120#8054(10.0.0.120)
;; WHEN: Mon Aug 17 20:48:08 2009
;; MSG SIZE rcvd: 74
Thanks,
--
Teemu
_______________________________________________
dnspython-users mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-users