Sonar scanner failed to connect to sonarqube server - Connection reset

I have the sonar scanner cli integrated with travis-ci build. There is nginx proxy in front of sonarqube server, serving incoming request at port 80 and also I have an ELB in front. The integration works and sonar scanner able to connect to sonarqube server and upload the reports but it is not consistent. It only works for few git project repositories but throws upload error for some repositories.


INFO: Analysis reports compressed in 792ms, zip size=3 MB
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 44.188s
INFO: Final Memory: 22M/725M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Fail to request
ERROR: Caused by: Connection reset

Caused by: Connection reset

It is weird it works for one repository but fails for another one. I am not able to figure out the reason for failure case repositories, I compared the sonar properties config for success one and failed one but no clue on the reason for failure. Maybe the nginx proxy is the reason or it is the travis-ci unable to connect to sonarqube server.
Would really appreciate if you could provide some inputs on troubleshooting the issue. Thanks.

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

    • SonarQube - 7.0 Community Edition
    • Scanner CLI - 3.3.0
    • Nginx proxy - 1.14.2
  • what are you trying to achieve
    Sonar scanner CLI to connect to sonarqube server to upload the analysis report. I think it is able to connect to the server and able to download plugins, it fails with an error during the analysis report upload.

  • what have you tried so far to achieve this
    I run the scan in debug mode to find the detailed log.I did not get much information from the logs on sonarqube server.

Have you figured this out yet? I am experiencing the same thing