-
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
Not using local DNS in /etc/resolver/* without internet #29
Comments
Are you using at least |
When developing, I recommend setting |
My bad, I forgot to mention. This is 4.2.3, installed a couple days ago (as a |
I tried it, and it (expectedly) didn't work:
I'm not sure what TTL has to do with this. After all, the system might have never seen internet since boot, e.g. if I'm on a train in Cambodia. All other lookup methods correctly resolve |
What's the result of |
|
Actually I can reproduce this, thanks for reporting! |
This bug is really interesting. It should never happen. |
Actually... um this is not a bug? I was following the Node.js docs:
I'll open a Node.js issue about that. |
I was actually experiencing the same problem when my system had an IP address assigned by the router's DHCP server (192.168.0.x) but the router uplink was broken. So I don't think what you referred to was the only reason. |
I don't know exactly how |
I can confirm that on Windows it works as expected ( |
Relevant Node.js issue: nodejs/node#33279 |
@sindresorhus I think it would be a good choice to remove the |
That must've been a new interface. I guess the Node.js app had started before, right? |
No, if that were the case and if it could have been fixed by simply restarting the node app I wouldn't be bothering opening this ticket. This is what I've repeated just now:
|
I tried the same but with my Ethernet cable directly plugged into my computer. Will try with the router now. |
I tried your steps but was playing with the |
Ok, so I created an Ubuntu instance, set up
|
What's the stack trace? |
Released |
with Internet connectivity:
without internet (unplugged ISP cable from the router,
you can see how the IP changes. This could be perhaps something Mac OS-related. |
Can you try #31 ( |
I managed to make all the current tests pass there. But it's missing some new tests anyway. Can you try it? |
I've released
const got = require('got');
const CacheableLookup = require('cacheable-lookup');
const dnsCache = new CacheableLookup();
got.get('http://django.test:8000/admin/', {dnsCache}).then(res => console.log(res.body)); Please let me know if it's fixed or not. |
This leads to:
I figured it's because
and for comparison:
|
That's good news! I think the problem is that |
Can you try again with |
Closing due to lack of response. I cannot reproduce it anymore with the newest version. |
I confirm that it works with |
When there is no internet connectivity (either interface down, or when there are problems at uplink), cacheable-lookup stops resolving
xxx.test
records from/etc/resolver/test
.With internet:
without internet:
for comparison, modules that don't use
cacheable-lookup
work just fine without internet:or:
my DNS setup is:
This is Mac OS 10.15.4.
The text was updated successfully, but these errors were encountered: