Couldn't create connection to server

Thanks for the continued support on this plugin, it’s much appreciated.

Following this update, I’ve been unable to run SonarLint in connected mode on WSL.

Here are the related error messages:

I’ve tried installing JRE 17 in both WSL & the host Windows system, to no avail. Furthermore, the sonarlint.ls.javaHome doesn’t appear to be applicable in the WSL VSCode window:

Note that the setting ID is dimmed. The error message indicates that the setting is only applicable in a local window (i.e. not one running in WSL). I didn’t see any material addressing this in the docs, so I’m not sure how relevant this is. FWIW, this setting is also dimmed when running the previous version of the plugin (3.22).

I’ve reverted to the previous version for now, which still appears to be working correctly. Is there something that I can do to remedy this? Any comments and suggestions are welcome.

Hi,

Welcome to the community and thanks for this report!

What versions are you seeing this in:

  • SonarLint
  • VSCode
  • Connected to SonarCloud or SonarQube (and which version)

 
Thx,
Ann

  • SonarLint: 4.0.1
  • VSCode: 1.84.1

I’m not sure how to find the version of SonarCloud that we’re using, but we use https://sonarcloud.io/.

Here is the output from VSCodeHelp: About:

Version: 1.84.1 (user setup)
Commit: 2b35e1e6d88f1ce073683991d1eff5284a32690f
Date: 2023-11-06T12:35:59.022Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621
1 Like

Hi, I also started experiencing this issue after updating sonarlint to the latest version. I’ve lost my connection to sonarQube server as well as a result of this update. I did download JRE17 but that doesn’t seem to have solved the problem. Please help

1 Like

Managed to resolve the problem with some help. Just input the file path to jdk17

1 Like

Hi @avinoamsn,

Thank you for your patience while were investigating the reported issue.

I suspect the "sonarlint.ls.javaHome" id is dimmed in the attached screenshot because it’s being set in the User settings rather than the Remote WSL settings. If that’s the case, could you please try setting in the Remote settings? This can be done from the command pallete with Open Remote Settings command as on the attached screenshot.

Please note that the "sonarlint.ls.javaHome" should point to the java home on your WSL (not the one Windows).

Let us know if the above helped with your issue. If not, I would kindly ask you to enable verbose logging and share the logs available in the “SonarLint Output”.

Thank you.

Best,
Vojtech from :sonarlint_vscode:

4 Likes

Although @vojtech.suchy’s observation was correct (I was attempting to update this from User Settings, but the configuration is actually set in Remote WSL Settings), I was never able to resolve this issue on 4.0. Subsequent updates to the plugin only resulted in other issues (primarily this one). Only after updating to 4.4.2 have I been able to use the 4.x version of this plugin.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.