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

networkMode=mirrored ssh clone github repo failed with timeout #11361

Closed
1 of 2 tasks
Ghost-LZW opened this issue Mar 24, 2024 · 9 comments
Closed
1 of 2 tasks

networkMode=mirrored ssh clone github repo failed with timeout #11361

Ghost-LZW opened this issue Mar 24, 2024 · 9 comments

Comments

@Ghost-LZW
Copy link

Windows Version

10.0.22621.3296

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-microsoft-standard-WSL2

Distro Version

Debian GNU/Linux 11 (bullseye)

Other Software

No response

Repro Steps

set .wslconfig as

[wsl2]
networkingMode=mirrored

start wsl, run git clone [email protected]:NVIDIA/cutlass.git , get Operation timed out after 300003 milliseconds
unset networking mode, git clone with ssh get work.

Expected Behavior

ssh clone work under networkingMode=mirrored

Actual Behavior

git clone via ssh failed, even I set mtu follow #4253

Diagnostic Logs

No response

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Ghost-LZW
Copy link
Author

More information, even git clone [email protected]:xxx/xxx.git failed, ssh -T [email protected] still work under mirrored network mode.

@zcobol
Copy link

zcobol commented Mar 24, 2024

@Ghost-LZW please post the full output of git clone. Could be a transient connectivity issue. I did a quick test and it seems to work as expected:

zcobol@texas:~$ wslinfo --networking-mode
mirrored
zcobol@texas:~$ git clone [email protected]:NVIDIA/cutlass.git
Cloning into 'cutlass'...
remote: Enumerating objects: 26383, done.
remote: Counting objects: 100% (9558/9558), done.
remote: Compressing objects: 100% (2135/2135), done.
remote: Total 26383 (delta 7952), reused 8409 (delta 7369), pack-reused 16825
Receiving objects: 100% (26383/26383), 42.67 MiB | 11.71 MiB/s, done.
Resolving deltas: 100% (19588/19588), done.

@Ghost-LZW
Copy link
Author

@zcobol wait for 27 min, but sometimes it get Operation timed out after 300003 milliseconds

❯ time git clone [email protected]:NVIDIA/cutlass.git                                                                  
Cloning into 'cutlass'...
^C
git clone [email protected]:NVIDIA/cutlass.git  0.00s user 0.00s system 0% cpu 27:23.58 total

❯ wslinfo --networking-mode                                                                                          
mirrored

if set network mode into nat

❯ wslinfo --networking-mode                                                                                         
nat
❯ git clone [email protected]:NVIDIA/cutlass.git                                                                       
Cloning into 'cutlass'...
remote: Enumerating objects: 26383, done.
remote: Counting objects: 100% (9210/9210), done.
remote: Compressing objects: 100% (2186/2186), done.
remote: Total 26383 (delta 7590), reused 8003 (delta 6970), pack-reused 17173
Receiving objects: 100% (26383/26383), 42.87 MiB | 5.12 MiB/s, done.
Resolving deltas: 100% (19551/19551), done.

@Ghost-LZW
Copy link
Author

after close my proxy, git clone get work ..., now the problem becom git clone via vpn work in powershell, but failed in wsl2. sorry for false report, I'll close this issue and check if this issue due to vpn software.

@oldshensheep
Copy link

If you are using a VPN, could you try setting the MTU to 1500 in WSL2? The interface should be the VPN's interface.

show interface

ip a 

change MTU

ip link set dev <interface_name> mtu 1500

@Ghost-LZW
Copy link
Author

If you are using a VPN, could you try setting the MTU to 1500 in WSL2? The interface should be the VPN's interface.

show interface

ip a 

change MTU

ip link set dev <interface_name> mtu 1500

I do set the MTU as the same as the host value but still does not work.

@oldshensheep
Copy link

I have a similar issue, git clone doesn't work, but ping works.

I do set the MTU as the same as the host value but still does not work.

Make sure the interface is VPN not the host's interface and set it in WSL not windows (I have not tested in windows)

You can test whether it's the same issue by using this command.

curl http://google.com --trace - -L

There will be an HTTP 301 redirect to http://www.google.com/. It should hang at this point, as it is sending a large web page. If you don't see the HTTP 301 redirection, this might not be the case.

== Info: Connected to www.google.com (142.251.32.36) port 80
=> Send header, 77 bytes (0x4d)
0000: 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a GET / HTTP/1.1..
0010: 48 6f 73 74 3a 20 77 77 77 2e 67 6f 6f 67 6c 65 Host: www.google
0020: 2e 63 6f 6d 0d 0a 55 73 65 72 2d 41 67 65 6e 74 .com..User-Agent
0030: 3a 20 63 75 72 6c 2f 38 2e 38 2e 30 0d 0a 41 63 : curl/8.8.0..Ac
0040: 63 65 70 74 3a 20 2a 2f 2a 0d 0a 0d 0a          cept: */*....
== Info: Request completely sent off

@Ghost-LZW
Copy link
Author

@oldshensheep Good catch ! Same issue, set mtu to 1500 instead of 9000 helped. I think the upcoming discussion will shift to your open issue.

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

3 participants