Hello,
our company uses SonarCloud, and we are in a phase of setting up a proper CI/CD pipeline. For now, we run the analysis manually from the command line
mvn verify -Pjacoco-report jacoco:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -DnecessaryParameters
This works fine, but for one of the branch we are getting an exception at the end of the maven job:
[INFO] CPD Executor CPD calculation finished (done) | time=4660ms
[INFO] Analysis report generated in 5560ms, dir size=172 MB
[INFO] Analysis report compressed in 31823ms, zip size=63 MB
[INFO] Analysis report uploaded in 67215ms
[INFO] ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=XXX
[INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
[INFO] More about the report processing at https://sonarcloud.io/api/ce/task?id=AYooUsDkDXwWrxZaOIDd
[java.net.SocketException: Broken pipe (Write failed), java.net.SocketException: Broken pipe (Write failed), java.net.SocketException: Broken pipe (Write failed), java.net.SocketException: Broken pipe (Write failed), java.net.SocketException: Broken pipe (Write failed), java.net.SocketException: Broken pipe (Write failed), java.net.SocketException: Broken pipe (Write failed)]
[WARNING] Failed to publish the sensor cache
[INFO] Time spent writing ucfgs 372ms
[INFO] Analysis total time: 27:11.556 s
The analysis is not visible in our SonarCloud project. I tried to run the maven job with debug flag to get more insight, but I do not see anything out of ordinary.
INFO] 10:56:31.113 Analysis report generated in 5316ms, dir size=172 MB
[INFO] 10:57:01.210 Analysis report compressed in 30097ms, zip size=63 MB
[INFO] 10:57:01.210 Analysis report generated in /XXX/target/sonar/scanner-report
[DEBUG] 10:57:01.210 Upload report
[DEBUG] 10:59:01.637 POST 200 https://sonarcloud.io/api/ce/submit?XXX | time=120423ms
[INFO] 10:59:01.651 Analysis report uploaded in 120441ms
[DEBUG] 10:59:01.658 Report metadata written to XXX/target/sonar/report-task.txt
[INFO] 10:59:01.658 ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=XXX
[INFO] 10:59:01.659 Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
[INFO] 10:59:01.659 More about the report processing at https://sonarcloud.io/api/ce/task?id=AYooDk7jC5kvvPhJ66-L
[DEBUG] 10:59:10.629 GET 200 https://ea6ne4j2sb.execute-api.eu-central-1.amazonaws.com/current/v1/sensor_cache/prepare_write?organization=XXX&project=XXX | time=587ms
[DEBUG] 11:00:23.929 PUT 200 https://sc-cleancode-sensorcache-eu-central-1-prod.s3.amazonaws.com...XXX | time=73297ms
[INFO] 11:00:23.931 Sensor cache published successfully
[DEBUG] 11:00:23.943 Post-jobs :
[DEBUG] 11:00:23.964 the bridge server will shutdown
[DEBUG] 11:00:28.967 the bridge server closed
[INFO] 11:00:28.973 Time spent writing ucfgs 346ms
[INFO] 11:00:31.639 Analysis total time: 25:15.214 s
[INFO] ------------------------------------------------------------------------
[DEBUG] Shutting down adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static]
[DEBUG] Shutting down 'file-lock' factory
[DEBUG] Shutting down 'rwlock-local' factory
[DEBUG] Shutting down 'semaphore-local' factory
[DEBUG] Shutting down 'noop' factory
While the error is not visible in the logs with the debug flag logging on the analysis is not visible in our SonarCloud project.
Thank you!
Tomas