-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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 request getaddrinfo ENOTFOUND #7931
Comments
Did you try explicitly setting |
@mscdex After setting I look up the api doc, it says
I think it's an optional parameter. And before setting |
Probably the OS is looking up an AAAA record (which does not exist for the hostname you've shown) because the network interface that your request is being sent through has an IPv6 address and that is being favored over IPv4. By default, node will just use whatever address that is returned by the OS. By explicitly telling the OS what type of address you want, it will return the address(es) you're expecting since A records for that hostname exist. |
Answered, closing. |
Needs to be there for this workaround: nodejs/node#7931
I'm doing a batch task, uploading a lot of files to a file server. I try several times. There will be some of the requests failed almost every time. Here is the Error:
I looked around some issues, #5488 #5436, but still do not know how to solve this problem. And here is the output of
dig nos.netease.com
andnslookup nos.netease.com
The text was updated successfully, but these errors were encountered: