Limit servers to IPv4 to make them work with WSL (only for WSL environments)#5956
Open
sh41 wants to merge 2 commits intonektos:masterfrom
Open
Limit servers to IPv4 to make them work with WSL (only for WSL environments)#5956sh41 wants to merge 2 commits intonektos:masterfrom
sh41 wants to merge 2 commits intonektos:masterfrom
Conversation
WSL2 requires IPv4-only (tcp4) for server connectivity due to networking limitations between Docker containers and WSL instances. Add CLI flags to configure network stack with auto-detection for the default based on WSL_DISTRO_NAME environment variable. Fixes nektos#2636 Fixes nektos#1866
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
Builds on the work by @stickeegreg in #5912 and responds to the comment from @ChristopherHX to making the default network stack for the artifact and cache services
tcp4if running in WSL. Also added the option to configure via CLI flags.Changes
WSL_DISTRO_NAMEis set: Usestcp4(IPv4-only) when launching the artifact & cache services to avoid EHOSTUNREACH/ECONNREFUSED errors (see ECONNREFUSED to artifact service on WSL2 with mirrored networking #2636 & Cache server EHOSTUNREACH #1866)tcp(dual-stack IPv4/IPv6) as before.--artifact-server-networkand--cache-server-networkCLI flags with validation for valid stack values (tcp,tcp4,tcp6)StartHandler()andServe()to accept network parameterUsage
Related Issues
Fixes #2636 - ECONNREFUSED to artifact service on WSL2
Fixes #1866 - Cache server EHOSTUNREACH on WSL2
Based on #5912 - Initial hardcoded fix