SonarQube Github Integration Failing

Must-share information (formatted with Markdown):

Which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

  • SonarQube Server Community Edition v10.6

How is SonarQube deployed: zip, Docker, Helm

  • SonarQube Server instantiated through the zip in an Azure VM running Windows 2019 Server
  • SonarQube Scanner running on GitHub Actions in a self-hosted runner (Azure VM mentioned above)
  • Java 17 installed on the VM

What are you trying to achieve

  • Integration with Github Actions

What have you tried so far to achieve this

Hello everyone!

I’ve been trying to set a code analysis using the context described above. While initially I was able to set up the project in the SonarQube server as described in the documentation, I then faced a separate permissions issue that lead me to redo the integration, but it did not work this time around. In the DevOps Platform Integrations I get “Failed to validate configuration, check URL and Private Key”. I checked the GitHub App info and it was all ok. I then checked the logs and got the following:

2024.08.13 13:48:43 WARN  web[][o.s.a.c.g.GithubApplicationClientImpl] Failed to request https://api.github.com/app
javax.net.ssl.SSLException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
	at java.base/sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:101)
	at java.base/sun.security.validator.Validator.getInstance(Validator.java:181)
	at java.base/sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:309)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:183)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:198)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1335)
	at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1226)
	at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1169)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1421)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
	... 33 common frames omitted
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
	at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
	at java.base/java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
	at java.base/java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
	at java.base/sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:98)
	... 49 common frames omitted

How can I solve this?

Thank you in advance for the help!

Hi,

This error message was a new one on me. My search took me to SO.

 
HTH,
Ann