You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to be clear, you're not actually doing http.get("http://url/", cb); but rather http.get("http://www.google.com/", cb); or some other website that exists - right?
Also, if you could try previous versions of Node and see if they work for you it would be very appreciated.
Reacted by Rakhman Asmatullayev, Abdullah Alhaider, BenBenBeartrax, Lane Schmidt, Sourav Kabiraj, iliscio, Mike92988, Frioui Oueis, Saurav M H, NoemiMolnar and 10 more
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 http.get({ family: 4, ... }, cb), that tells node not to use AI_V4MAPPED. Use { family: 6 } if you want an IPv6 connection.
Reacted by Robert, Arsalan Ahmad, arvindh-mani, Mirko, bobosie, Shawn Cheung, mitchmike, jeremeyer, Ted Chen, kYem and 3 more
I'm using uclibc 1.0.12. At the moment I'm compiling buildroot with standard glibc. Will tell you if something has changed.
Setting the family to 4 is working. 6 is giving me back the known errors.
Reacted by Yaroslav, Ckend, croraf, Samuel Chan, Johan Sundström, ManasSaxenaTil, Mandeep Singh Gulati, Lane Schmidt, BaptisteGarcin, Mina Luke and 1 more
Reacted by Yaroslav, Jamaguana, BaptisteGarcin and alexander-lux-solvatio
I face this issue while running angular protractor in azure pipeline. works fine in local machine but fails in pipeline . Is there any solution to this now ? If not any workarounds please?
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.
I face this issue while running angular protractor in azure pipeline. works fine in local machine but fails in pipeline . Is there any solution to this now ? If not any workarounds please?
Hi @gigglegirl did you get the working solution for this?
Activity
benjamingr commentedon Feb 25, 2016
Just to be clear, you're not actually doing
http.get("http://url/", cb);but ratherhttp.get("http://www.google.com/", cb);or some other website that exists - right?Also, if you could try previous versions of Node and see if they work for you it would be very appreciated.
T94T commentedon Feb 25, 2016
Yes. url and host are just placeholders.
silverwind commentedon Feb 25, 2016
getaddrinfois by definition a DNS issue. Doesdig hostornslookup hostwork? Doesdns.lookup(host, console.log)work? Can you post the domain?T94T commentedon Feb 25, 2016
digis not available for buildroot.nslookupis working and gives me the ip address back. I tested lots of different domains (ex. www.hackaday.com)T94T commentedon Feb 25, 2016
and yes,
dns.lookup(host, console.log)works and the returned ip address is correct.bnoordhuis commentedon Feb 26, 2016
What does
dns.lookup(host, {hints: dns.ADDRCONFIG|dns.V4MAPPED}, console.log)print?T94T commentedon Feb 26, 2016
bnoordhuis commentedon Feb 26, 2016
Am I right that it works with
{hints:0}? What happens with{hints:dns.ADDRCONFIG}and{hints:dns.V4MAPPED}?T94T commentedon Feb 26, 2016
'x.x.x.x' 4'x.x.x.x' 4x.x.x.x is the correct IP returned.
bnoordhuis commentedon Feb 26, 2016
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
http.get({ family: 4, ... }, cb), that tells node not to use AI_V4MAPPED. Use{ family: 6 }if you want an IPv6 connection.T94T commentedon Feb 27, 2016
I'm using uclibc 1.0.12. At the moment I'm compiling buildroot with standard glibc. Will tell you if something has changed.
Setting the family to 4 is working. 6 is giving me back the known errors.
So, current workaround will be this:
T94T commentedon Feb 27, 2016
I cannot compile buildroot with standard glibc. There are too many errors.
So for now, above workaround will be the best solution for me.
bnoordhuis commentedon Feb 27, 2016
Glad it's working for you now. I'll close the issue.
55 remaining items
dploeger commentedon Jun 24, 2019
Okay. And the other applications (like
ping) do the same but handle the result for you. Got it. Thanks.ahmad-ali14 commentedon Jan 8, 2020
same problem node expres js
vandersondf commentedon Apr 1, 2020
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.
gigglegirl commentedon Sep 2, 2020
I face this issue while running angular protractor in azure pipeline. works fine in local machine but fails in pipeline . Is there any solution to this now ? If not any workarounds please?
bodinsamuel commentedon Sep 16, 2020
I don't understand how the "fix" proposed by @bnoordhuis in 2016 is still relevant (or not a default option or documented) 😞
bnoordhuis commentedon Sep 16, 2020
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.
gaoxianglyx commentedon Feb 19, 2021
same error, in my axios
Joshfindit commentedon Mar 3, 2021
Ok, quick question:
Assuming
https.get(or a similar library such asaxios)What is the method we should be using?
No combination of
try/catchor.then().catch()is working for meintelliot commentedon Mar 3, 2021
Did you try adding an on(‘error’, ...) listener? https://nodejs.org/api/https.html#https_https_get_options_callback
himharsh1997 commentedon Mar 15, 2021
request/request#2536
himharsh1997 commentedon Mar 15, 2021
request/request#2536
Eren1415 commentedon Dec 31, 2021
the solution is simple: go to the IDE copilot extension menu and reinstall the extension
FIX: prevent random `ENOTFOUND` errors by explicitly using ipv4
akshaykumarsingh2 commentedon Dec 13, 2022
Hi @gigglegirl did you get the working solution for this?
IrisZhang commentedon Jul 9, 2024
If your use windows and a proxy service, try to set the system hosts file. Add
127.0.0.1 example.comto the file.