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

Java language sever only opens for user with id=1000 on wsl #3654

Open
mikedoy opened this issue May 15, 2024 · 1 comment
Open

Java language sever only opens for user with id=1000 on wsl #3654

mikedoy opened this issue May 15, 2024 · 1 comment

Comments

@mikedoy
Copy link

mikedoy commented May 15, 2024

When developing on wsl the Java language server will not run anymore.
This is the stacktrace:
[Error - 3:08:10 PM] Language Support for Java (Syntax Server) client: couldn't create connection to server.
Error: listen EACCES: permission denied /mnt/wslg/runtime-dir/lsp-0ad34880cf45cbb2a5599303d6a3b088.sock
at Server.setupListenHandle [as _listen2] (node:net:1800:21)
at listenInCluster (node:net:1865:12)
at Server.listen (node:net:1964:5)
at /home/lawson/.vscode-server/extensions/redhat.java-1.30.0-linux-x64/dist/extension.js:2:1136886
at new Promise ()
at t.createClientPipeTransport (/home/lawson/.vscode-server/extensions/redhat.java-1.30.0-linux-x64/dist/extension.js:2:1136777)
at /home/lawson/.vscode-server/extensions/redhat.java-1.30.0-linux-x64/dist/extension.js:2:1333531
at async c.createConnection (/home/lawson/.vscode-server/extensions/redhat.java-1.30.0-linux-x64/dist/extension.js:2:1165774)
at async c.start (/home/lawson/.vscode-server/extensions/redhat.java-1.30.0-linux-x64/dist/extension.js:2:1156291)

Switching to a user with uid=1000 resolves the issue.
This is a regression, it used to work fine with uid=1620

Environment
  • Operating System: Windows 11 and wsl2 :
    wsl --version
    WSL version: 2.1.5.0
    Kernel version: 5.15.146.1-2
    WSLg version: 1.0.60
    MSRDC version: 1.2.5105
    Direct3D version: 1.611.1-81528511
    DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
    Windows version: 10.0.22631.3447

cat /etc/system-release
Amazon Linux release 2 (Karoo)

  • JDK version:
    java --version
    openjdk 17.0.10 2024-01-16 LTS
    OpenJDK Runtime Environment Corretto-17.0.10.8.1 (build 17.0.10+8-LTS)
    OpenJDK 64-Bit Server VM Corretto-17.0.10.8.1 (build 17.0.10+8-LTS, mixed mode, sharing)
  • Visual Studio Code version:
    Version: 1.89.1
    Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
    Date: 2024-05-07T05:13:33.891Z
    Electron: 28.2.8
    ElectronBuildId: 27744544
    Chromium: 120.0.6099.291
    Node.js: 18.18.2
    V8: 12.0.267.19-electron.0
    OS: Windows_NT x64 10.0.22631
  • Java extension version:
    v1.30.0
Steps To Reproduce
  1. set default user in wsl to user with id other than 1000
  2. start vscode with java code

[Please attach a sample project reproducing the error]
I don't have a project, just starting vscode as described will cause the error.

Current Result

Java language server does not start

Expected Result

Java language server starts

Additional Informations

This seems to be related to this older yet still unresolved vscode bug :
microsoft/WSL#9025

However, this just started happening within the last week or so.

@rgrunber
Copy link
Member

rgrunber commented May 16, 2024

We switched the default transport from stdio to pipe. You should be able to set "java.transport" : "stdio" in your settings to work around the issue.

I think some permission related issues were discussed at #3634 but that was more about configuring the folder under which the socket is created. We don't really have control over how the socket itself is created though.

CC'ing @testforstephen for awareness.

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

2 participants