Comments (4)
Interesting.
If you do this below and see if it resolves.
>>> import dns.resolver
>>> dns.resolver.resolve('localhost')[0].address
'127.0.0.1'
from octodns-bind.
>>> import dns.resolver
>>> dns.resolver.resolve('localhost')[0].address
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ross/octodns/octodns-bind/env/lib/python3.10/site-packages/dns/resolver.py", line 1368, in resolve
return get_default_resolver().resolve(
File "/Users/ross/octodns/octodns-bind/env/lib/python3.10/site-packages/dns/resolver.py", line 1190, in resolve
(request, answer) = resolution.next_request()
File "/Users/ross/octodns/octodns-bind/env/lib/python3.10/site-packages/dns/resolver.py", line 691, in next_request
raise NXDOMAIN(qnames=self.qnames_to_try, responses=self.nxdomain_responses)
dns.resolver.NXDOMAIN: The DNS query name does not exist: localhost.
from octodns-bind.
Fix over in #25
from octodns-bind.
Oh this probably happens because dns.resolver
does actually query a resolver immediately and doesn't go through the normal chain of things (host file, etc.) before making it. So in some cases you have like systemd-resolved
dealing with that or whatever resolver may be running locally on the machine and then going to a real resolver, but if your resolver is 1.1.1.1 or something and it queries it, you won't get anything.
Interesting, may need to change that so it does the actual looking into host file, etc or just handle the localhost -> 127.0.0.1
in the code (which I don't love). Probably need to use socket.gethostbyname
from octodns-bind.
Related Issues (12)
- No records found in ZoneFileSource HOT 5
- dns.query.xfr() is deprecated in dnspython 2.1 HOT 2
- AxfrProvider unable to dump when Host is a DNS name HOT 5
- It is not possible to put the port number in variable HOT 4
- dns.resolver.resolver does not refer to /etc/hosts before querying resolver HOT 3
- Have all records types in the local dev server zone HOT 2
- Support AXFR/RF2136 to Azure Private DNS HOT 6
- GSS-TSIG Authentication Support for Active Directory DNS HOT 3
- TXT records lose space symbol HOT 7
- BIND provider as target? HOT 4
- Add ZoneFileProvider configuration example to README
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octodns-bind.