Can't connect Visual Studio SonarLint to SonarQube: Validating the connection failed

I do not want to take over this topic from the original poster.
I will open a new one.

1 Like

Hello @cacti77,

I created another custom build that provides the proxy settings configured at the system level by leveraging our backend’s API (SlCore).

I would invite you to install it again. If the problem persists, could you please share the verbose logs or at least the logs that indicate the problem?

Note: you no longer have to provide the path to Java Home as it should work with the embedded JRE as well.

1 Like

Fantastic! Yay - this new custom build connected to the SonarQube server first time! Thank you so much!

What I did: uninstalled the last extension, installed the new one and it connected to the SQ server as expected when I tried to add the binding. I removed the C:\Tools\jdk\jdk-20.0.1 entry from the Java Home field of the SonarLint options, restarted VS and it still worked. So it looks like it also works with the embedded JRE, as you stated. This is great, because usability is best if you assume zero knowledge of Java:-).

Here’s an example entry from the verbose logs:
[ThreadId 36] [DEBUG] [SLCORE] GET 200 https://path_to_SQ_server/sonarqube/api/system/status | response time=473ms

Do you know when we can expect this fix to appear in the next regular release of this extension, please?

2 Likes

Thank you for trying again the newest build and for your very detailed feedback, @cacti77!

As many users seem to be experiencing this issue, we will release a fix as soon as possible (probably next week). I will keep you informed!

3 Likes

@gabriela.trutan - that’s great news, thanks!

Aside: can I ask why you allow the user to specify a Java Home directory in the first place? What benefits does that offer that’s not covered by the embedded JRE? (Especially if the proxy issue is fixed now!)

Aside: can I ask why you allow the user to specify a Java Home directory in the first place? What benefits does that offer that’s not covered by the embedded JRE? (Especially if the proxy issue is fixed now!)

@cacti77, this is a feature that is useful for users with tightly configured environments, see for example this thread.

Additionally, I want to let you know that the version 8.8.1 that includes the fix has been released.

Thank you for your feedback and collaboration for fixing this problem!

All the best,
Gabriela

2 Likes

Brilliant, thank you @gabriela.trutan! I was able to upgrade to the 8.8.1.11452 release and confirm it still appears to work ok. Thanks for working on a fix and for releasing it quickly so we can use it in Visual Studio again!

(And thanks for the JRE explanation; makes sense.)