SonarLint Language Server client: couldn't create connection to server

Please provide

  • Operating system: Ubuntu 22.04
  • SonarQube for VS Code plugin version: 4.29
  • Programming language you’re coding in: Python
  • Is connected mode used:
    • SonarQube Server

And a thorough description of the problem / question:

Plugin stopped working

The Java Runtime Environment can not be located. Please install a JRE, or configure its path with the sonarlint.ls.javaHome property. You can also let SonarQube for VS Code download the JRE from AdoptOpenJDK. This JRE will be used only by SonarQube for VS Code.

Output from plugin

2025-08-18 15:16:43.340 [info] [Error - 15:16:43] SonarLint Language Server client: couldn't create connection to server.
2025-08-18 15:16:43.341 [info] [object Object]

Version 4.28 of plugin is working fine.

2 Likes

We are seeing the same issue here too.

Same here. I re-installed the previous version 4.28.0 to workaround the issue.

1 Like

Same here and jdk installation doesn’t help this issue.

Just roll-back and reinstall 4.28.0 instead of 4.29

1 Like

Hi folks,

Thanks a lot for the reports! We are trying to reproduce the problem on our side :eyes:

If possible, could you please share the full output from SonarQube for IDE? And also the console logs.

Thanks in advance and apologies for the inconvenience :person_bowing:

All the best,
Sophio

@daulis , @MT_L , @Mideum , just to be clear - do you also see the JRE could not be located error followed by couldn't create connection to server? Could you also share what OS are you on? Do you have sonarlint.ls.javaHome setting configured?

I have the same issue. This is the only information I can see.

The error occurred after installing the latest update (4.29.0).

Ubuntu 24.04.3 LTS

1 Like

Thanks, @Stanislau_25 :woman_bowing:

Would you be able to share the Developer tools console output as well? Do you have sonarlint.ls.javaHome setting set?

We still have not managed to reproduce the issue. :sad_but_relieved_face:

Here is all information. Sorry for the screenshot, I can provide you with text but there is nothing else. I assumed this text is not very helpful.

1 Like

We have not changed anything regarding startup / JRE path detection in the latest release.

Could it be that when you updated, a ‘Universal’ version of the plugin (without embedded JRE) was installed for some reason? To test the theory, you could download the Linux (or your respective platform) VSIX from our releases page, and install it manually to VS Code.

Alternatively, you can check the ~/.vscode/extensions folder to see the the version of the plugin installed, and all the distribution files that came with it. For example, for me on MacOS the folder is ~/.vscode/extensions/sonarsource.sonarlint-vscode-4.29.0-darwin-arm64, and when I check inside it contains the jre folder.

Thanks A LOT for helping us investigate :folded_hands:

After downloading from GitHub extension is working fine with version 4.29.

1 Like

You know, after I manually added the Java path to the ‘sonarlint.ls.javaHome’ parameter in the VSCode settings, it worked.

1 Like

Interesting! Thanks a lot @Michal.Klich & @Stanislau_25. Let’s see what others say.

As you see on our releases page, we ship 4 platform-specific packages with embedded JREs, and one universal package without the JRE. Then, it’s up to the VSCode’s plugin update logic to deduce the target platform and install the correct package. I am assuming something went wrong with this service for a short period of time when you updated the plugin, so you ended up with a universal VSIX without the JRE. :eyes:

1 Like
2025-08-20 11:02:50.406 [info] [Error - 11:02:50 AM] SonarLint Language Server client: couldn't create connection to server.
2025-08-20 11:02:50.406 [info] [object Object]

I am seeing the same error.
vscode locally development work on by Linux Mint 21.3.
vscode remote ssh development (Rocky Linux 9.5 (Blue Onyx)) cause that error.

I don’t have sonarlint.ls.javaHome configured.

Please notice rolling back to version 4.28.0 on remote ssh machine, everything is working as expected.

After manually setting “sonarlint.ls.javaHome” in Remote[SSH: ] settings.json. It works in remote development.
That is not a requirement in 4.28.0 but in 4.29.0.

With 4.28.0, Remote SSH is using sonarsource java to execute the command.

2025-08-20 14:20:13.909 [info] Executing /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/jre/21.0.8-linux-x86_64.tar/bin/java -jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/server/sonarlint-ls.jar -stdio -analyzers /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonargo.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarjava.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarjavasymbolicexecution.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarjs.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarphp.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarpython.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarhtml.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarxml.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonartext.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonariac.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.28.0-linux-x64/analyzers/sonarlintomnisharp.jar /usr/home/mlam/.vscode-server/extensions/sonarsource.sonarlint_ondemand-analyzers/sonar-cfamily-plugin/6.70.0.87073/sonarcfamily.jar

With 4.29.0, it requires to set “sonarlint.ls.javaHome” to find the “java” command to excecute the jar.

Thanks a lot for the details @MT_L :woman_bowing:

I am still guessing that for some reason, at the moment that you updated, VS Code could not correctly determine the target OS and installed a distribution without the embedded JRE. So to fix the issue you will either need to specify sonarlint.ls.javaHome property (which you already did), or download the Linux-specific distribution and install it manually.

Hope that helps,
Sophio

I’m running remote SSH, and have javaHome defined, but I still receive 2 errors when running 4.29.0:

SonarLint Language Server client: couldn’t create connection to server.

and

The ‘sonarlint.ls.javaHome’ variable defined in VS Code settings (/usr/bin/java) does not point to a JRE.

Result of whereis java
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz

Result of java --version
openjdk 17.0.15 2025-04-15
OpenJDK Runtime Environment (build 17.0.15+6-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 17.0.15+6-Ubuntu-0ubuntu120.04, mixed mode, sharing)

Downgrading to 4.28.0 fixes the issue.

Thanks for the details, @Azia_Seye! :woman_bowing:

Please try to manually upgrade as described here. The reason can be found here.

From the example you provided, the javaHome setting is, I think, incorrect. The sonarlint.ls.javaHome setting needs path to the directory where JRE was installed. Output of where java points to the path to the Java executable.

Hope this helps,
Sophio

Setting sonarlint.ls.javaHome to /usr seems to solve to issue. Thanks!

1 Like