fix(cli): default to IPv4-first DNS resolution to avoid undici IPv6 connect timeouts#2699
Open
dsitmilis wants to merge 1 commit into
Open
fix(cli): default to IPv4-first DNS resolution to avoid undici IPv6 connect timeouts#2699dsitmilis wants to merge 1 commit into
dsitmilis wants to merge 1 commit into
Conversation
…onnect timeouts Node 18+/undici attempts IPv6 connections that can silently drop, causing 'fetch connect timeout' (502) when proxying upstream requests. Appending --dns-result-order=ipv4first to the spawned server and tray background processes forces IPv4-first fallback, resolving the hang. Closes decolua#2696
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #2696 —
fetch connect timeout(502) when proxying upstream requests, caused by Node 18+/undici attempting IPv6 connections that silently drop.Appends
--dns-result-order=ipv4firstto the spawned processes incli/cli.js:spawnServer)bgProcess)Forcing IPv4-first DNS resolution makes undici fall back to IPv4 instead of hanging on a dead IPv6 route.
Validation
node --check cli/cli.jspasses (syntax valid).Closes #2696.