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

Interop not working from WSL2 #6799

Closed
joedborg opened this issue Apr 13, 2021 · 8 comments
Closed

Interop not working from WSL2 #6799

joedborg opened this issue Apr 13, 2021 · 8 comments

Comments

@joedborg
Copy link

joedborg commented Apr 13, 2021

Windows Build Number

Microsoft Windows [Version 10.0.19042.906]

WSL Version

WSL 2

Distro Version

Ubuntu 20.04

Other Software

VS Code 1.55.1

Repro Steps

Run any .exe from WSL

Expected Behavior

.exe runs

Actual Behavior

<3>init: (747) ERROR: UtilConnectToInteropServer:300: connect failed 2

Diagnostic Logs

https://aka.ms/AAbxvmk

@craigloewen-msft
Copy link
Member

@joedborg can you please attach logs when you're reproing this problem? We aren't able to repro this issue and would need more info to diagnose it:

Instructions here:
https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs

@joedborg
Copy link
Author

joedborg commented Apr 14, 2021

Hi there, thanks for the reply. I've done some digging and can see that the issue is that the env var $WSL_INTEROP is not pointing to a valid socket:

c/Users/Joe
➜ echo $WSL_INTEROP
/run/WSL/1587_interop

c/Users/Joe
➜ ls /run/WSL
1353_interop  3750_interop  7_interop

If I set this variable to the last created socket file, it works again, but this is being set per shell, so I have to keep doing so with every shell launch.

@craigloewen-msft
Copy link
Member

Awesome, thanks so much! Could you still collect logs using the link above? The info in the logs will help us diagnose why $WSL_INTEROP isn't behaving as expected.

@joedborg
Copy link
Author

Thanks @craigloewen-msft, added the link in the original post.

@therealkenc
Copy link
Collaborator

This is likely going to be spiritually similar #5065 #4148 (with a side of #6588). You can confirm with a new user with an unadulterated shell startup script.

$ sudo useradd -s /bin/bash foo

Looks like:

image

@joedborg
Copy link
Author

Thanks @therealkenc,

It could also be that I'm using systemd instead of initd. Is there anywhere (or could you explain) that can show the chain of how WSL_INTEROP gets set, please? That way I can at least try and check to see where is overwriting it / isn't setting it correctly.

Cheers!

@therealkenc
Copy link
Collaborator

It could also be that I'm using systemd

Thanks. /dupe #6588 ➡️ #994.

@ghost
Copy link

ghost commented Apr 15, 2021

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

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

No branches or pull requests

3 participants