Giter VIP home page Giter VIP logo

Comments (10)

vinaycr7 avatar vinaycr7 commented on July 23, 2024

I have also faced the same issue

from cacheable-lookup.

szmarczak avatar szmarczak commented on July 23, 2024

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.

lokesh411 avatar lokesh411 commented on July 23, 2024

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.

szmarczak avatar szmarczak commented on July 23, 2024

The website doesn't work for me. Can you post a screenshot or give another source please?

from cacheable-lookup.

lokesh411 avatar lokesh411 commented on July 23, 2024

Screenshot 2022-09-08 at 7 34 28 PM

[](url)

Screenshot 2022-09-08 at 7 35 09 PM

from cacheable-lookup.

szmarczak avatar szmarczak commented on July 23, 2024

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.

lokesh411 avatar lokesh411 commented on July 23, 2024

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.

szmarczak avatar szmarczak commented on July 23, 2024

Correct, that's part of #52

from cacheable-lookup.

lokesh411 avatar lokesh411 commented on July 23, 2024

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.

SuperOleg39 avatar SuperOleg39 commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.