-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
http.get returns "getaddrinfo ENOTFOUND" error #5436
Comments
Just to be clear, you're not actually doing Also, if you could try previous versions of Node and see if they work for you it would be very appreciated. |
Yes. url and host are just placeholders. |
|
|
and yes, |
What does |
|
Am I right that it works with |
x.x.x.x is the correct IP returned. |
Thanks. You didn't mention what version of glibc you have installed but you're probably hitting a bug in that library. www.hackaday.com is a good example - it's a CNAME for hackaday.com and older glibc versions didn't handle AI_V4MAPPED for such records. As a workaround, try |
I'm using uclibc 1.0.12. At the moment I'm compiling buildroot with standard glibc. Will tell you if something has changed. So, current workaround will be this:
|
I cannot compile buildroot with standard glibc. There are too many errors. |
Glad it's working for you now. I'll close the issue. |
FYI, this was caused by uClibc-ng not handling AI_V4MAPPED correctly and is now fixed: |
Hi Peter, I just saw your message regarding the uClibc "bug". Thanks a lot!!!!! Will Regards and have a nice weekend, 2016-03-11 13:00 GMT+01:00 Peter Korsgaard notifications@github.com:
|
You're welcome. Notice that there hasn't been any new uclibc-ng releases with this fix and it hasn't been integrated into the Buildroot yet. I'll most likely do so this weekend. |
I noticed it before and thought to include the current rev version. But 2016-03-11 21:02 GMT+01:00 Peter Korsgaard notifications@github.com:
|
/cc @indutny - perhaps lib/dns.js should only set AI_V4MAPPED when family == 6? |
I just downloaded the newest buildroot and compiled it. My issue is now 2016-03-11 21:02 GMT+01:00 Peter Korsgaard notifications@github.com:
|
What versions of node was this fix included in? |
workaround doesn't work for me. Node v6.5.0, MacOS 10.11.6
|
You are doing a lookup for 'http://google.com/' when it should be just 'google.com'. |
The same problem as@SoundBot, but is ok local, some time occur in docker.
any body has work out the final resolution? |
@denghuiquan did you try setting the 'family':4 option as suggested above? I had a similar problem and that fixed it for me. I'm surprised that problem is persisting even at the end of 2016. I was running into this issue on a RPI2 running Raspbian Lite using node v6.9.2. |
specify an usable dns, normally the 8.8.8.8 for the dockerfile would help to this. @ArsalanDotMe |
Node.js is agnostic, it merely passes on the options to the system resolver. That means you get a lot of control but you also get to deal with libc idiosyncrasies. |
Okay. And the other applications (like |
same problem node expres js |
i had the same problem when to node work behind proxy. curl, wget, browse and postman works fine, but node request not. works for me set proxy.host e proxy.port in axios config. |
I don't understand how the "fix" proposed by @bnoordhuis in 2016 is still relevant (or not a default option or documented) 😞 |
Easy - if Node.js were to list every random bug you could possibly hit in some third-party library, the documentation would be several times its current size. |
same error, in my axios |
Ok, quick question: Assuming
What is the method we should be using? No combination of |
Did you try adding an on(‘error’, ...) listener? https://nodejs.org/api/https.html#https_https_get_options_callback |
1 similar comment
the solution is simple: go to the IDE copilot extension menu and reinstall the extension |
Apparently it can happen that requests within node will randomly switch between ipv6 and ipv4 unless one of them is explicitly specified. I have configured ipv4 for now and that seems to fix it. See also: * axios/axios#444 * nodejs/node#5436
Hi @gigglegirl did you get the working solution for this? |
If your use windows and a proxy service, try to set the system hosts file. Add |
Hi all,
I'm trying to fix following problem since five days.
When I'm doing a
or
there's this error coming back:
When doing a https request to google.com:
Got error: connect ENETUNREACH 2a00:1450:400a:806::1014:443 - Local (:::0)
I can definitely say it's NOT a DNS or a PROXY issue.
What I testet so far:
node.js sample code:
The text was updated successfully, but these errors were encountered: