-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cacheable lookup responds with ESERVFAIL while native dns.resolve works #68
Comments
I have also faced the same issue |
Duplicate of #52. What does |
https://bluecatnetworks.com/blog/the-top-four-dns-response-codes-and-what-they-mean/ |
The website doesn't work for me. Can you post a screenshot or give another source please? |
That doesn't seem to be correct. I just used Google again and this time found this:
Which means that there's an internal server error. In that case we definitely want to throw an error. If a server doesn't support IPv6, it shouldn't respond with SERVFAIL. Closing as duplicate of #52 |
Yeah in some DNS servers this happens, when i point to CF dns it returns with |
Correct, that's part of #52 |
The problem still exists, when i query for some domains like staging.camsrepository.com, CF DNS resolver throws ESERVFAIL. Since the implementation is querying for both resolve4 and resolve6, should we use promise.allSettled instead of promise.all |
Hello! Is this temporary workaround correct?
|
Hello,
I have come across a issue where cacheable.lookup or cacheable.lookupAsync was giving
ESERVFAIL
while dns.resolve or dns.lookup worked perfectly fine.When i went through the code, i found out that we are trying to resolve for both IPv4 and IPv6 addresses for the domain. If the server sends failure (ESERVFAIL) for the dns lookup since the hostname doesn't exists in the respective IP family, even if it can resolve for the other IP family the library throws the error.
Reference:
[https://github.com/szmarczak/cacheable-lookup/blob/master/source/index.js#L244]
Any reasons where we should lookup for both IPv4 and IPv6 addresses?
const [A, AAAA] = await Promise.all([ ignoreNoResultErrors(this._resolve4(hostname, ttl)), ignoreNoResultErrors(this._resolve6(hostname, ttl)) ]);
For a domain i found that resolve4 was working fine but resolve6 was failing with
ESERVFAIL
errorThe text was updated successfully, but these errors were encountered: