Comments (10)
I have also faced the same issue
from cacheable-lookup.
Duplicate of #52. What does ESERVFAIL
mean? I couldn't find anything in the internet about this. Not sure if we should treat this an empty response (it would work in that case), but first I need to know the meaning of the error.
from cacheable-lookup.
https://bluecatnetworks.com/blog/the-top-four-dns-response-codes-and-what-they-mean/
@szmarczak This explains all the the DNS errors, ESERVFAIL
means that the query failed because the answer cannot be given, means the server refuses to give response for the query.
Shouldn't be handled in a way where we would get only one query IPv4 and if the DNS is not present we could call IPv6 right?
from cacheable-lookup.
The website doesn't work for me. Can you post a screenshot or give another source please?
from cacheable-lookup.
from cacheable-lookup.
That doesn't seem to be correct. I just used Google again and this time found this:
default("Server failure: unable to process this query due to a problem with the name server"): return SERVFAIL
"catch-all" SERVFAIL: something went wrong but what exactly?
When a user receives SERVFAIL, the failure can be one of the following:
The stub resolver fails to send the request.
The stub resolver doesn’t get a response.
The recursive resolver, which the stub resolver sends its query to, is overloaded.
The recursive resolver is unable to communicate with upstream authoritative servers.
The recursive resolver fails to verify the DNSSEC chain.
The authoritative server takes too long to respond.In such cases, it is nearly impossible for the user to know exactly what’s wrong. The resolver is usually the one to be blamed, because, as an agent, it fails to get back the answer, and doesn’t return a clear reason for the failure in the response.
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
from cacheable-lookup.
Yeah in some DNS servers this happens, when i point to CF dns it returns with ENOTFOUND
. But we don't have to query for IPv4 and IPv6 addresses right on resolve()
from cacheable-lookup.
Correct, that's part of #52
from cacheable-lookup.
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
Code reference: https://github.com/szmarczak/cacheable-lookup/blob/master/source/index.mjs#L251
from cacheable-lookup.
Hello! Is this temporary workaround correct?
const cacheable = new CacheableLookup({
cache,
maxTtl,
});
const originalLookup = cacheable.lookup;
cacheable.lookup = (hostname, options, callback) => {
if (hostname === 'localhost') {
return dns.lookup(hostname, options, callback);
}
originalLookup.call(cacheable, hostname, options, callback);
};
cacheable.install(http.globalAgent);
cacheable.install(https.globalAgent);
from cacheable-lookup.
Related Issues (20)
- Fallback fails when one family returns ENOENT HOT 1
- TS error when using QuickLRU from readme example HOT 5
- Querying for family=6 when family=4 is explicitly requested? HOT 3
- Question: How is DNS resolved? HOT 2
- DNS lookup are not cached HOT 3
- TS incompatibility between CacheableLookup.lookup and @types/node LookupFunction HOT 2
- round-robin dns support HOT 2
- Jest reporting CachableLookup is preventing shutdown HOT 3
- Ability to set minTtl? HOT 1
- Add stats to see how many calls were cached HOT 1
- Can you obtain the local hosts first and then use resolve4 or resolve6 HOT 5
- dns lookup is not cached the way I understand HOT 1
- Enable tests again
- http2 & cacheable-lookup HOT 1
- Source isn't returned in Entry object HOT 1
- No way to dispose and timeout problems HOT 1
- Prefetch before expiration
- dnsCache.lookup types might be wrong? HOT 1
- Is there a version which supports CJS ? HOT 3
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 cacheable-lookup.