Failed to upload report - HTTP code 502

Hi there

I’m trying to analyze my project using Travis-Ci. Here’s the build:
I followed the official Documentation from:

I’ve this in my .travis.yml:

    organization: "tbmelabs-github"
      secure: [TOKEN]

An I run the Maven command:

mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar

Authentication seems to work fine but as the build tries to upload the report I receive an HTTP 502 response from the server. Has anonye seen or experienced this any time earlier?

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project configuration-server: Failed to upload report - HTTP code 502 -> [Help 1]

Regards and many thanks, Timon

Hi Timon,

from what I see on your organization, this relates to the following project:

I assume that you have created the project from within the “Create Project” web interface - which is good. You can see on the right side of the page that the key for this project is: tbmelabs-configuration-server. However, I could not find this information in your POM nor in your Travis YML file - which means that SonarCloud will infer the key from the POM groupId and artifactId - which does not match.

All in all, here’s what you need to add in your POM properties to have the analysis working:


Hi Fabrice

That did not completly fix it but got me the right idea! I didn’t know it relates on the pom. All I adapted was the sonar.projectKey AND sonar.projectName and now it works like a charm.
Thank you very much.

Regards, Timon

1 Like