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

socket.timeout: timed out when attempting to run any command with wsl-sudo in WSL2 #4

Open
lanouettea opened this issue Aug 17, 2021 · 6 comments

Comments

@lanouettea
Copy link

lanouettea commented Aug 17, 2021

I'm running WSL2 Ubuntu 20.04 on Windows 11. This is a fresh WSL2 installation with barely nothing else installed.

I did a fresh checkout of the current master, which should have #2 merged in. When I run the script, using any command as argument, I get a timeout with the following stack trace:

python3 wsl-sudo.py net.exe 
Traceback (most recent call last):
  File "wsl-sudo.py", line 335, in <module>
    main()
  File "wsl-sudo.py", line 331, in main
    UnprivilegedClient().main(**vars(args))
  File "wsl-sudo.py", line 236, in main
    self.sock, acc = listen_socket.accept()
  File "/usr/lib/python3.8/socket.py", line 292, in accept
    fd, addr = self._accept()
socket.timeout: timed out

Any clues as what might be causing this?

@lanouettea lanouettea changed the title git log socket.timeout: timed out when attempting to run any command with wsl-sudo in WSL2 Aug 17, 2021
@highTowerSU
Copy link

I think your current user is not admin. I have the same problem when elevating from non-admin user...

@asos-douglaswaugh
Copy link

@highTowerSU, when you say current user, do you mean the Linux user or the Windows user? I seem to be having a similar problem.

@highTowerSU
Copy link

highTowerSU commented May 19, 2022

I think of was the underlying Win User, but i am unsere...

@fenjen
Copy link

fenjen commented Dec 21, 2023

The error occurs when you run wsl-sudo.py from a non-default WSL instance. Does it work with this version? Here's an example that works for me:

python wsl-sudo.py "/mnt/c/Program Files (x86)/Vim/vim82/gvim.exe"

(I know vim 9 is out.)

@spector32
Copy link

spector32 commented May 12, 2024

I have the same issue on WSL2 Ubuntu (22.04). I tried applying the changes from this PR that @fenjen mentioned in their comment, but it did not help. Another thing to mention is that my Windows OS has multiple users and the default one is not an Administrator, so when I try to run the python3 ... command, the login window pops up. Maybe that ahs something to do with this issue.

@fenjen
Copy link

fenjen commented May 13, 2024

@spector32 Is the user running the WSL instance an administrator? If not, the login window that pops up (with a pre-filled administrator account asking for a password) is what I would expect.

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

5 participants