Skip to content
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

Happy Eyeballs breaks simple-get if ipv6 times out #85

Open
koush opened this issue Jun 1, 2024 · 3 comments
Open

Happy Eyeballs breaks simple-get if ipv6 times out #85

koush opened this issue Jun 1, 2024 · 3 comments

Comments

@koush
Copy link

koush commented Jun 1, 2024

The underlying issue is that when dns resolves to multiple IPs all ips are attempted. ipv6 is tried first, then ipv4. This behavior is known as Happy Eyeballs. https://en.wikipedia.org/wiki/Happy_Eyeballs

node http now (v18 or v20?) tries both ipv6 and ipv4 addresses on requests.

For every ip connect timeout failure, it will emit a timeout event which simple-get interprets as an error and terminate the request (which is still attempting other ips).

req.abort()

Specifically, disabling/ignoring this ipv6 timeout event in simple-get allows the request to succeed on ipv4, and prebuild-install completes successfully.

This timeout event handling may be a bug in either node (since the entire request hasnt timed out, just 1 ip attempt), or a bug in simple-get where it should be more discerning about which request timeout events it should observe. In any case, this is an issue with an end user machines ipv6 network configuration.

@koush
Copy link
Author

koush commented Jun 1, 2024

I don't know how to reproduce this issue. It only happens on machines with a seemingly misconfigured or broken ipv6 router.

@vweevers
Copy link

vweevers commented Jun 1, 2024

Looks like this was a bug in node, fixed in nodejs/node#47860.

@koush
Copy link
Author

koush commented Jun 1, 2024

That does look familiar, but I'm seeing this behavior on node 20.13.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants