jenkins集成sonaqube,代码扫描完成上传report时,报Failed to upload report: Error 500

问题

jenkins集成sonaqube,代码扫描完成上传report时,报错

报错信息

INFO: Analysis report generated in 184ms, dir size=12.3 MB
INFO: Analysis report compressed in 1326ms, zip size=4.1 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 3:00.786s
INFO: Final Memory: 27M/94M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Failed to upload report: Error 500 on https://www.qinningcloud.cn/api/ce/submit?projectKey=litemall&projectName=litemall : {“errors”:[{“msg”:“An error has occurred. Please contact your administrator”}]}
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:206)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:141)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:369)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:135)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: org.sonarqube.ws.client.HttpException: Error 500 on https://www.qinningcloud.cn/api/ce/submit?projectKey=litemall&projectName=litemall : {“errors”:[{“msg”:“An error has occurred. Please contact your administrator”}]}
at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
at org.sonar.scanner.bootstrap.DefaultScannerWsClient.failIfUnauthorized(DefaultScannerWsClient.java:126)
at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:89)
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:204)
… 19 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

环境

sonarqube是通过nginx配置ssl证书,反向代理配置sonarqube地址+9000端口实现方式

你把中间的执行结果也贴下吧

jenkins日志:
Started by user qinning
Running as SYSTEM
Building remotely on slave in workspace /root/jenkins_slave/workspace/litemall
The recommended git tool is: NONE
No credentials specified
Cloning the remote Git repository
Cloning repository https://gitee.com/qinxiaoning/litemall.git

git init /root/jenkins_slave/workspace/litemall # timeout=10
Fetching upstream changes from https://gitee.com/qinxiaoning/litemall.git
git --version # timeout=10
git --version # ‘git version 1.8.3.1’
git fetch --tags --progress https://gitee.com/qinxiaoning/litemall.git +refs/heads/:refs/remotes/origin/ # timeout=10
git config remote.origin.url https://gitee.com/qinxiaoning/litemall.git # timeout=10
git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
Avoid second fetch
git rev-parse refs/remotes/origin/main^{commit} # timeout=10
Checking out Revision 3d7d47f1ca558c0960cd6d99f68beb6991cf9039 (refs/remotes/origin/main)
git config core.sparsecheckout # timeout=10
git checkout -f 3d7d47f1ca558c0960cd6d99f68beb6991cf9039 # timeout=10
Commit message: “litemallv1.7.0”
git rev-list --no-walk 3d7d47f1ca558c0960cd6d99f68beb6991cf9039 # timeout=10
[litemall] $ /bin/bash -xe /tmp/jenkins17693801793614639892.sh

  • mvn clean package
    [WARNING]
    [WARNING] Some problems were encountered while building the effective settings
    [WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen …jo" if these are not already contained in the list.\r\n |–>\r\n <p… @79:5) @ /usr/local/apache-maven-3.8.6/conf/settings.xml, line 79, column 5
    [WARNING]
    [INFO] Scanning for projects…
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for org.linlinjava:litemall-all:jar:0.1.0
    [WARNING] ‘build.plugins.plugin.(groupId:artifactId)’ must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-resources-plugin @ line 74, column 21
    [WARNING]
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING]
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING]
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Build Order:
    [INFO]
    [INFO] litemall [pom]
    [INFO] litemall-db [jar]
    [INFO] litemall-core [jar]
    [INFO] litemall-wx-api [jar]
    [INFO] litemall-admin-api [jar]
    [INFO] litemall-all [jar]
    [INFO]
    [INFO] ----------------------< org.linlinjava:litemall >-----------------------
    [INFO] Building litemall 0.1.0 [1/6]
    [INFO] --------------------------------[ pom ]---------------------------------
    [INFO]
    [INFO] — maven-clean-plugin:3.1.0:clean (default-clean) @ litemall —
    [INFO]
    [INFO] ---------------------< org.linlinjava:litemall-db >---------------------
    [INFO] Building litemall-db 0.1.0 [2/6]
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO]
    [INFO] — maven-clean-plugin:3.1.0:clean (default-clean) @ litemall-db —
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:resources (default-resources) @ litemall-db —
    [INFO] Using ‘UTF-8’ encoding to copy filtered resources.
    [INFO] Copying 2 resources
    [INFO] Copying 37 resources
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ litemall-db —
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 153 source files to /root/jenkins_slave/workspace/litemall/litemall-db/target/classes
    [WARNING] /root/jenkins_slave/workspace/litemall/litemall-db/src/main/java/org/linlinjava/litemall/db/util/DbUtil.java: /root/jenkins_slave/workspace/litemall/litemall-db/src/main/java/org/linlinjava/litemall/db/util/DbUtil.java uses or overrides a deprecated API.
    [WARNING] /root/jenkins_slave/workspace/litemall/litemall-db/src/main/java/org/linlinjava/litemall/db/util/DbUtil.java: Recompile with -Xlint:deprecation for details.
    [WARNING] /root/jenkins_slave/workspace/litemall/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallPermission.java: Some input files use or override a deprecated API that is marked for removal.
    [WARNING] /root/jenkins_slave/workspace/litemall/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallPermission.java: Recompile with -Xlint:removal for details.
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:testResources (default-testResources) @ litemall-db —
    [INFO] Not copying test resources
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ litemall-db —
    [INFO] Not compiling test sources
    [INFO]
    [INFO] — maven-surefire-plugin:2.22.2:test (default-test) @ litemall-db —
    [INFO] Tests are skipped.
    [INFO]
    [INFO] — maven-jar-plugin:3.1.2:jar (default-jar) @ litemall-db —
    [INFO] Building jar: /root/jenkins_slave/workspace/litemall/litemall-db/target/litemall-db-0.1.0.jar
    [INFO]
    [INFO] --------------------< org.linlinjava:litemall-core >--------------------
    [INFO] Building litemall-core 0.1.0 [3/6]
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO]
    [INFO] — maven-clean-plugin:3.1.0:clean (default-clean) @ litemall-core —
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:resources (default-resources) @ litemall-core —
    [INFO] Using ‘UTF-8’ encoding to copy filtered resources.
    [INFO] Copying 2 resources
    [INFO] Copying 2 resources
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ litemall-core —
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 48 source files to /root/jenkins_slave/workspace/litemall/litemall-core/target/classes
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:testResources (default-testResources) @ litemall-core —
    [INFO] Not copying test resources
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ litemall-core —
    [INFO] Not compiling test sources
    [INFO]
    [INFO] — maven-surefire-plugin:2.22.2:test (default-test) @ litemall-core —
    [INFO] Tests are skipped.
    [INFO]
    [INFO] — maven-jar-plugin:3.1.2:jar (default-jar) @ litemall-core —
    [INFO] Building jar: /root/jenkins_slave/workspace/litemall/litemall-core/target/litemall-core-0.1.0.jar
    [INFO]
    [INFO] -------------------< org.linlinjava:litemall-wx-api >-------------------
    [INFO] Building litemall-wx-api 0.1.0 [4/6]
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO]
    [INFO] — maven-clean-plugin:3.1.0:clean (default-clean) @ litemall-wx-api —
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:resources (default-resources) @ litemall-wx-api —
    [INFO] Using ‘UTF-8’ encoding to copy filtered resources.
    [INFO] Copying 2 resources
    [INFO] Copying 0 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ litemall-wx-api —
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 43 source files to /root/jenkins_slave/workspace/litemall/litemall-wx-api/target/classes
    [WARNING] /root/jenkins_slave/workspace/litemall/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxGrouponRuleService.java: /root/jenkins_slave/workspace/litemall/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxGrouponRuleService.java uses unchecked or unsafe operations.
    [WARNING] /root/jenkins_slave/workspace/litemall/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxGrouponRuleService.java: Recompile with -Xlint:unchecked for details.
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:testResources (default-testResources) @ litemall-wx-api —
    [INFO] Not copying test resources
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ litemall-wx-api —
    [INFO] Not compiling test sources
    [INFO]
    [INFO] — maven-surefire-plugin:2.22.2:test (default-test) @ litemall-wx-api —
    [INFO] Tests are skipped.
    [INFO]
    [INFO] — maven-jar-plugin:3.1.2:jar (default-jar) @ litemall-wx-api —
    [INFO] Building jar: /root/jenkins_slave/workspace/litemall/litemall-wx-api/target/litemall-wx-api-0.1.0.jar
    [INFO]
    [INFO] — spring-boot-maven-plugin:2.1.5.RELEASE:repackage (repackage) @ litemall-wx-api —
    [INFO] Attaching repackaged archive /root/jenkins_slave/workspace/litemall/litemall-wx-api/target/litemall-wx-api-0.1.0-exec.jar with classifier exec
    [INFO]
    [INFO] -----------------< org.linlinjava:litemall-admin-api >------------------
    [INFO] Building litemall-admin-api 0.1.0 [5/6]
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO]
    [INFO] — maven-clean-plugin:3.1.0:clean (default-clean) @ litemall-admin-api —
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:resources (default-resources) @ litemall-admin-api —
    [INFO] Using ‘UTF-8’ encoding to copy filtered resources.
    [INFO] Copying 2 resources
    [INFO] Copying 0 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ litemall-admin-api —
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 54 source files to /root/jenkins_slave/workspace/litemall/litemall-admin-api/target/classes
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:testResources (default-testResources) @ litemall-admin-api —
    [INFO] Not copying test resources
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ litemall-admin-api —
    [INFO] Not compiling test sources
    [INFO]
    [INFO] — maven-surefire-plugin:2.22.2:test (default-test) @ litemall-admin-api —
    [INFO] Tests are skipped.
    [INFO]
    [INFO] — maven-jar-plugin:3.1.2:jar (default-jar) @ litemall-admin-api —
    [INFO] Building jar: /root/jenkins_slave/workspace/litemall/litemall-admin-api/target/litemall-admin-api-0.1.0.jar
    [INFO]
    [INFO] — spring-boot-maven-plugin:2.1.5.RELEASE:repackage (repackage) @ litemall-admin-api —
    [INFO] Attaching repackaged archive /root/jenkins_slave/workspace/litemall/litemall-admin-api/target/litemall-admin-api-0.1.0-exec.jar with classifier exec
    [INFO]
    [INFO] --------------------< org.linlinjava:litemall-all >---------------------
    [INFO] Building litemall-all 0.1.0 [6/6]
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO]
    [INFO] — maven-clean-plugin:3.1.0:clean (default-clean) @ litemall-all —
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:copy-resources (copy-resources) @ litemall-all —
    [INFO] Using ‘UTF-8’ encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /root/jenkins_slave/workspace/litemall/litemall-all/…/litemall-admin/dist
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:copy-resources (copy-resources-vue) @ litemall-all —
    [INFO] Using ‘UTF-8’ encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /root/jenkins_slave/workspace/litemall/litemall-all/…/litemall-vue/dist
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:resources (default-resources) @ litemall-all —
    [INFO] Using ‘UTF-8’ encoding to copy filtered resources.
    [INFO] Copying 1 resource
    [INFO] Copying 1 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ litemall-all —
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 1 source file to /root/jenkins_slave/workspace/litemall/litemall-all/target/classes
    [INFO]
    [INFO] — maven-resources-plugin:3.1.0:testResources (default-testResources) @ litemall-all —
    [INFO] Not copying test resources
    [INFO]
    [INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ litemall-all —
    [INFO] Not compiling test sources
    [INFO]
    [INFO] — maven-surefire-plugin:2.22.2:test (default-test) @ litemall-all —
    [INFO] Tests are skipped.
    [INFO]
    [INFO] — maven-jar-plugin:3.1.2:jar (default-jar) @ litemall-all —
    [INFO] Building jar: /root/jenkins_slave/workspace/litemall/litemall-all/target/litemall-all-0.1.0.jar
    [INFO]
    [INFO] — spring-boot-maven-plugin:2.1.5.RELEASE:repackage (repackage) @ litemall-all —
    [INFO] Attaching repackaged archive /root/jenkins_slave/workspace/litemall/litemall-all/target/litemall-all-0.1.0-exec.jar with classifier exec
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary for litemall 0.1.0:
    [INFO]
    [INFO] litemall … SUCCESS [ 0.126 s]
    [INFO] litemall-db … SUCCESS [ 6.174 s]
    [INFO] litemall-core … SUCCESS [ 0.812 s]
    [INFO] litemall-wx-api … SUCCESS [ 0.967 s]
    [INFO] litemall-admin-api … SUCCESS [ 0.655 s]
    [INFO] litemall-all … SUCCESS [ 0.297 s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9.250 s
    [INFO] Finished at: 2022-10-11T20:44:05+08:00
    [INFO] ------------------------------------------------------------------------
    [litemall] $ /root/jenkins_slave/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube-Scanner/bin/sonar-scanner -Dsonar.host.url=https://www.qinningcloud.cn/ ******** -Dsonar.projectKey=litemall -Dsonar.projectName=litemall -Dsonar.login=squ_e9dba932db37f7975b5f1406b3e3ebdc7b2c8900 -Dsonar.projectVersion=1.0 -Dsonar.sources=. -Dsonar.java.binaries=**/target/classes -Dsonar.my.property=value -Dsonar.projectBaseDir=/root/jenkins_slave/workspace/litemall
    WARN: Property ‘sonar.login’ with value ‘squ_e9dba932db37f7975b5f1406b3e3ebdc7b2c8900’ is overridden with value ‘squ_e9dba932db37f7975b5f1406b3e3ebdc7b2c8900’
    INFO: Scanner configuration file: /root/jenkins_slave/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube-Scanner/conf/sonar-scanner.properties
    INFO: Project root configuration file: NONE
    INFO: SonarScanner 4.7.0.2747
    INFO: Java 18.0.2 Red Hat, Inc. (64-bit)
    INFO: Linux 3.10.0-1160.53.1.el7.x86_64 amd64
    INFO: User cache: /root/.sonar/cache
    INFO: Scanner configuration file: /root/jenkins_slave/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube-Scanner/conf/sonar-scanner.properties
    INFO: Project root configuration file: NONE
    INFO: Analyzing on SonarQube server 9.6.1.59531
    INFO: Default locale: “en_US”, source code encoding: “UTF-8” (analysis is platform dependent)
    INFO: Load global settings
    INFO: Load global settings (done) | time=158ms
    INFO: Server id: F14756E0-AYN6K4j0ekX9W4xZCRDp
    INFO: User cache: /root/.sonar/cache
    INFO: Load/download plugins
    INFO: Load plugins index
    INFO: Load plugins index (done) | time=56ms
    INFO: Plugin [l10nzh] defines ‘l10nen’ as base plugin. This metadata can be removed from manifest of l10n plugins since version 5.2.
    INFO: Load/download plugins (done) | time=106ms
    INFO: Process project properties
    INFO: Process project properties (done) | time=7ms
    INFO: Execute project builders
    INFO: Execute project builders (done) | time=1ms
    INFO: Project key: litemall
    INFO: Base dir: /root/jenkins_slave/workspace/litemall
    INFO: Working dir: /root/jenkins_slave/workspace/litemall/.scannerwork
    INFO: Load project settings for component key: ‘litemall’
    INFO: Auto-configuring with CI ‘Jenkins’
    INFO: Load quality profiles
    INFO: Load quality profiles (done) | time=90ms
    INFO: Load active rules
    INFO: Load active rules (done) | time=64777ms
    INFO: Load analysis cache
    INFO: Load analysis cache (404) | time=17ms
    INFO: Load project repositories
    INFO: Load project repositories (done) | time=18ms
    INFO: Indexing files…
    INFO: Project configuration:
    INFO: 1444 files indexed
    INFO: 657 files ignored because of scm ignore settings
    INFO: Quality profile for css: Sonar way
    INFO: Quality profile for java: Sonar way
    INFO: Quality profile for js: Sonar way
    INFO: Quality profile for json: Sonar way
    INFO: Quality profile for web: Sonar way
    INFO: Quality profile for xml: Sonar way
    INFO: Quality profile for yaml: Sonar way
    INFO: ------------- Run sensors on module litemall
    INFO: Load metrics repository
    INFO: Load metrics repository (done) | time=41ms
    INFO: Sensor JavaSensor [java]
    INFO: Configured Java source version (sonar.java.source): none
    INFO: JavaClasspath initialization
    INFO: JavaClasspath initialization (done) | time=39ms
    INFO: JavaTestClasspath initialization
    INFO: JavaTestClasspath initialization (done) | time=1ms
    INFO: Server-side caching is enabled. The Java analyzer will not try to leverage data from a previous analysis.
    INFO: Using ECJ batch to parse 328 Main java source files with batch size 49 KB.
    INFO: Starting batch processing.
    INFO: The Java analyzer cannot skip unchanged files in this context. A full analysis is performed for all files.
    INFO: 100% analyzed
    INFO: Batch processing: Done.
    INFO: Did not optimize analysis for any files, performed a full analysis for all 328 files.
    WARN: Dependencies/libraries were not provided for analysis of SOURCE files. The ‘sonar.java.libraries’ property is empty. Verify your configuration, as you might end up with less precise results.
    WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
    WARN: Use of preview features have been detected during analysis. Enable DEBUG mode to see them.
    INFO: No “Test” source files to scan.
    INFO: No “Generated” source files to scan.
    INFO: Sensor JavaSensor [java] (done) | time=28785ms
    INFO: Sensor JaCoCo XML Report Importer [jacoco]
    INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
    INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
    INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=5ms
    INFO: Sensor IaC CloudFormation Sensor [iac]
    INFO: 0 source files to be analyzed
    INFO: 0/0 source files have been analyzed
    INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=101ms
    INFO: Sensor IaC Kubernetes Sensor [iac]
    INFO: 0 source files to be analyzed
    INFO: 0/0 source files have been analyzed
    INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=47ms
    INFO: Sensor JavaScript analysis [javascript]
    INFO: 364 source files to be analyzed
    INFO: 62/364 files analyzed, current file: /root/jenkins_slave/workspace/litemall/litemall-admin/src/store/modules/user.js
    INFO: 184/364 files analyzed, current file: /root/jenkins_slave/workspace/litemall/litemall-wx/pages/ucenter/couponList/couponList.js
    INFO: 306/364 files analyzed, current file: /root/jenkins_slave/workspace/litemall/litemall-wx/lib/wxParse/showdown.js
    INFO: 364/364 source files have been analyzed
    INFO: Sensor JavaScript analysis [javascript] (done) | time=40325ms
    INFO: Sensor TypeScript analysis [javascript]
    INFO: No input files found for analysis
    INFO: Sensor TypeScript analysis [javascript] (done) | time=4ms
    INFO: Sensor JavaScript inside YAML analysis [javascript]
    INFO: 13 source files to be analyzed
    INFO: 13/13 source files have been analyzed
    INFO: Sensor JavaScript inside YAML analysis [javascript] (done) | time=124ms
    INFO: Sensor CSS Metrics [javascript]
    INFO: Sensor CSS Metrics [javascript] (done) | time=66ms
    INFO: Sensor CSS Rules [javascript]
    INFO: 131 source files to be analyzed
    INFO: 131/131 source files have been analyzed
    INFO: Sensor CSS Rules [javascript] (done) | time=2462ms
    INFO: Sensor C# Project Type Information [csharp]
    INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
    INFO: Sensor C# Analysis Log [csharp]
    INFO: Sensor C# Analysis Log [csharp] (done) | time=11ms
    INFO: Sensor C# Properties [csharp]
    INFO: Sensor C# Properties [csharp] (done) | time=0ms
    INFO: Sensor SurefireSensor [java]
    INFO: parsing [/root/jenkins_slave/workspace/litemall/target/surefire-reports]
    INFO: Sensor SurefireSensor [java] (done) | time=1ms
    INFO: Sensor HTML [web]
    INFO: Sensor HTML [web] (done) | time=217ms
    INFO: Sensor XML Sensor [xml]
    INFO: 45 source files to be analyzed
    INFO: 45/45 source files have been analyzed
    INFO: Sensor XML Sensor [xml] (done) | time=899ms
    INFO: Sensor Text Sensor [text]
    INFO: 915 source files to be analyzed
    INFO: 915/915 source files have been analyzed
    INFO: Sensor Text Sensor [text] (done) | time=290ms
    INFO: Sensor VB.NET Project Type Information [vbnet]
    INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
    INFO: Sensor VB.NET Analysis Log [vbnet]
    INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=11ms
    INFO: Sensor VB.NET Properties [vbnet]
    INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
    INFO: ------------- Run sensors on project
    INFO: Sensor Analysis Warnings import [csharp]
    INFO: Sensor Analysis Warnings import [csharp] (done) | time=0ms
    INFO: Sensor Zero Coverage Sensor
    INFO: Sensor Zero Coverage Sensor (done) | time=108ms
    INFO: Sensor Java CPD Block Indexer
    INFO: Sensor Java CPD Block Indexer (done) | time=561ms
    INFO: SCM Publisher SCM provider for this project is: git
    INFO: SCM Publisher 754 source files to be analyzed
    INFO: SCM Publisher 754/754 source files have been analyzed (done) | time=2080ms
    INFO: CPD Executor 51 files had no CPD blocks
    INFO: CPD Executor Calculating CPD for 643 files
    INFO: CPD Executor CPD calculation finished (done) | time=462ms
    INFO: Analysis report generated in 184ms, dir size=12.3 MB
    INFO: Analysis report compressed in 1326ms, zip size=4.1 MB
    INFO: ------------------------------------------------------------------------
    INFO: EXECUTION FAILURE
    INFO: ------------------------------------------------------------------------
    INFO: Total time: 3:00.786s
    INFO: Final Memory: 27M/94M
    INFO: ------------------------------------------------------------------------
    ERROR: Error during SonarScanner execution
    java.lang.IllegalStateException: Failed to upload report: Error 500 on https://www.qinningcloud.cn/api/ce/submit?projectKey=litemall&projectName=litemall : {“errors”:[{“msg”:“An error has occurred. Please contact your administrator”}]}
    at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:206)
    at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:141)
    at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:369)
    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:135)
    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:577)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
    at org.sonarsource.scanner.cli.Main.main(Main.java:61)
    Caused by: org.sonarqube.ws.client.HttpException: Error 500 on https://www.qinningcloud.cn/api/ce/submit?projectKey=litemall&projectName=litemall : {“errors”:[{“msg”:“An error has occurred. Please contact your administrator”}]}
    at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
    at org.sonar.scanner.bootstrap.DefaultScannerWsClient.failIfUnauthorized(DefaultScannerWsClient.java:126)
    at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:89)
    at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:204)
    … 19 more
    ERROR:
    ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
    WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeed?
    ERROR: SonarQube scanner exited with non-zero code: 1
    Finished: FAILURE

nginx的conf配置:
[root@qinning-19870331 nginx]# cat nginx.conf

For more information on configuration, see:

* Official English Documentation: http://nginx.org/en/docs/

* Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.

include /usr/share/nginx/modules/*.conf;

events {
worker_connections 1024;
}

http {
log_format main '$remote_addr - $remote_user [$time_local] “$request” ’
'$status $body_bytes_sent “$http_referer” ’
‘“$http_user_agent” “$http_x_forwarded_for”’;

access_log  /var/log/nginx/access.log  main;

sendfile            on;
tcp_nopush          on;
tcp_nodelay         on;
keepalive_timeout   65;
types_hash_max_size 4096;

include             /etc/nginx/mime.types;
default_type        application/octet-stream;

client_max_body_size 1025m;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

server {
    listen       80;
    listen       [::]:80;
    server_name  _;
    root         /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    error_page 404 /404.html;
    location = /404.html {
    }

    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    }
}

Settings for a TLS enabled server.

server {

listen 443 ssl http2;

listen [::]:443 ssl http2;

server_name _;

root /usr/share/nginx/html;

ssl_certificate “/etc/pki/nginx/server.crt”;

ssl_certificate_key “/etc/pki/nginx/private/server.key”;

ssl_session_cache shared:SSL:1m;

ssl_session_timeout 10m;

ssl_ciphers HIGH:!aNULL:!MD5;

ssl_prefer_server_ciphers on;

# Load configuration files for the default server block.

include /etc/nginx/default.d/*.conf;

error_page 404 /404.html;

location = /40x.html {

}

error_page 500 502 503 504 /50x.html;

location = /50x.html {

}

}

server {
listen 443 ssl;
server_name qinningcloud.cn;
ssl on;
ssl_certificate /etc/nginx/cert/server.crt;
ssl_certificate_key /etc/nginx/cert/server.key;
location / {
proxy_pass http://120.46.212.224:9000;
#proxy_pass http://www.qinningcloud.cn.:9000;
root html;
index index.html index.htm;
}
}

}

补充sonarqube报错日志:
错误详情
java.lang.IllegalStateException: Fail to select data of CE task AYPJ1td3ZYyRyhXtaNOh
at org.sonar.db.ce.CeTaskInputDao.selectData(CeTaskInputDao.java:74)
at org.sonar.ce.task.projectanalysis.step.ExtractReportStep.execute(ExtractReportStep.java:66)
at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:80)
at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:71)
at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:58)
at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:383)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:181)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:133)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
at org.sonar.db.ce.CeTaskInputDao.selectData(CeTaskInputDao.java:67)
… 20 more
Caused by: java.io.EOFException
at org.postgresql.core.PGStream.receive(PGStream.java:648)
at org.postgresql.core.PGStream.receiveTupleV3(PGStream.java:606)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2333)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
… 27 more

服务器那边接受的时候出了问题,可能是你上传的报告太大了,你可以测试下小项目行不行,如果可以的话,估计要修改nginx的请求包大小了。

 server {
 client_max_body_size 100M;
 }

想了解细节,你可以用mitmproxy做个反向代理查看下500时候的报错提示。