I recently upgraded from SonarQube 8.9 to SonarQube 9.9 LTS. The old one was running in container on an AWS EC2 instance. I just taken AMI backup and span a new EC2 instance and upgrade the SonarQube and Postgres version. However, the old was supproting https, but new one does not support the https and showing the error. Also, my sonarqube is integrated with jenkins and when jenkins is calling SonarMaven Scan, it’s getting failed with this error, however if I hardcode the URL with http://:9000, it was successful. Also, my code environment is different (java 8,11,17) and my jenkins servers and slaves are running with java 8 version by default but for code environment java 11,17, I set the java_home path externally with JDK-11 and it was successful for SonarMaven Scan. How to solve the https issue where it’s not supporting the https://URL?
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:188.8.131.526:sonar (default-cli) on project xxx: Failed to upload report: Fail to request url: https://sonarqube.xxx.com/api/ce/submit?projectKey=com.xxx.xxx&projectName=xxx: Hostname sonarqube.xxx.com not verified (no certificates)
Successful one -> mvn sonar:sonar -Dsonar.qualitygate.wait=true -Dsonar.host.url=http://x.x.x.x:9000/) -f ./pom.xml