Eclipse SonarLint: Connect to SonarQube via HTTPS - PKIX path building failed

  • Operating system: Windows 10
  • SonarLint plugin version: 7.9
  • Programming language you’re coding in: Java
  • Is connected mode used: No (I’m trying to connect it)
    • Connected to SonarCloud or SonarQube (and which version): SonarQube Version 8.9.7.52159 (not connected yet)

I’m trying to connect my Eclipse SonarLint plugin to my SonarQube server (that uses HTTPS) but I cannot reach the server due to certificate problems.

When I try to connect to the SonarQube server (using the SonarLint plugin’s wizard) I get the following error message:

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

sonarlint wizard

What I’ve tried so far:

  • I know this problem is related to the certificates of the HTTPS server that the SonarQube is running on but although I imported the certificates into the keystore of my JRE the problem persists.
  • When I try to run an analysis in a gradle task that sends the results to the same SonarQube server everything works fine so I think the imported certificates are ok.
  • I also tried to import the certificates in the eclipse jre (the one that is mentioned in the eclipse.ini file) but that doesn’t fix it either.
  • Configuring a different trust-store (using the javax.net.ssl.trustStore vm argument in the eclipse.ini file) or deleting this argument doesn’t change anything

The Problem might be related to this topic: Sonarlint eclipse cant connect to sonarqube secured with client certificate

This seems to be an Eclipse issue. After installing a clean, new Eclipse (same version that I used before) it works without any problems. I just needed to import the certificates into the JRE that was mentioned in the eclipse.ini file and it worked.

I don’t realy know why this solved the issue, but it seems to be reproducable.

3 Likes

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