SonarQube Upgradation Issue for Apigee

Dear All
We are facing issue in Jenkins pipeline at SonarQube stage For Apigee , Recently Sonar up-gradation done with version 8.9 LTS previous version of Sonar qube was 7.7

Sonar Maven pulgin version is 3.2

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project API-ErrorSharedFlow-apigee: Unable to execute SonarQube: Fail to download libraries from server → [Help 1]

[INFO] User cache: /home/tomcat/.sonar/cache
[ERROR] SonarQube server [http://a.b.c.d:9000/sonarqube] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.377 s
[INFO] Finished at: 2021-12-21T11:44:05+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project API-ErrorSharedFlow-apigee: Unable to execute SonarQube: Fail to get bootstrap index from server: Status returned by url [http://a.b.c.d:9000/sonarqube/batch/index] is not valid: [504] → [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoExecutionException - Apache Maven - Apache Software Foundation
[Pipeline] }
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeeded?



It seems that your SonarQube server is offline. First, you need to verify why it’s not running checking the log files in the “logs” directory.

You didn’t specified how you did the upgrade… SonarQube 7.7 runs on JDK 8, SonarQube 8.9 LTS requires JDK 11. Are you using the correct JDK?

Also note you can’t upgrade from 7.7 to 8.9 LTS directly. First you need to upgrade to SonarQube 7.9.6 (the former LTS version) and then upgrade to 8.9 LTS (the current LTS).

It’s explained on the docs:

Migration path

(…) However, if there are one or multiple LTS versions in your migration path, you must first migrate to each intermediate LTS and then to your target version, as shown in Example 3 below.

Example 1 – From 8.1 > 9.0, the migration path is 8.1 > 8.9.1 LTS > 9.0
Example 2 – From 8.2 > 8.9 LTS, the migration path is 8.2 > the latest 8.9 LTS patch.
Example 3 – From 6.7.7 LTS > 8.9 LTS, the migration path is 6.7.7 LTS > 7.9.6 LTS > the latest 8.9 LTS patch.

we are following below mentioned version upgraiton path

(Current) Sonar 7.7 community edition → 7.9 LTS Community Edition → 8.9 LTS Community Edition → 8.9 LTS Developer Edition

From the same VM ( from where Jenking build will run) we are able to connect to below URL using curl command, our VM is Linux machine,

Java 11 version we are using.

Thanks !!! but still we are getting same error, highly appreciated for quick help.

Hi Felipe and team.

In settings.xml we have disabled proxy server configuration,After disabling this proxy configurations ,build was successful. however in sonar server for this particular project/build sonar analysis is not uploaded .

	stage('SonarQube Analysis') {			steps {			    script {			        def files = findFiles()			        files.each{ f ->			            if( {			                if("${}" != ".git" && !"${}".contains("@tmp")) {			                    echo "inside the directory :- ${}"                                    dir("${}") {			                        withSonarQubeEnv('SonarQube') {										sh "mvn clean -X sonar:sonar -Dapigee_proxy_name=${env.proxyname}-apigee"                                    }			                    }			                }			            }			        }			    }			}			post {                failure {                    sendFailureNotification('SonarQube Analysis')                }			}		}		stage("SonarQube Quality Gate") {            steps {                script {                    timeout(time: 1, unit: 'HOURS') {                        def qg = waitForQualityGate()                        echo "${qg.status}"						if (qg.status != 'OK') {							error "******Pipeline aborted due to quality gate failure: ${qg.status}"						}                    }                }            }			post {                failure {                    sendFailureNotification('SonarQube Quality Gate')                }			}        }