Error uploading results for a large project

I have a Java project with a few thousand source files. So it’s a pretty big file. I believe the analysis is able to complete successfully however it’s failing on upload. I’ve tried rerunning the build with -X -e and sonar.debug=true, but there is not a lot of client-side information. Below is what I have. Any thoughts?

20:26:13.648 CPD Executor CPD calculation finished (done) | time=15996ms
20:27:04.371 Analysis report generated in 41781ms, dir size=86 MB
20:28:06.461 Analysis report compressed in 62090ms, zip size=30 MB
20:28:06.461 Analysis report generated in C:\PROJECT_NAME\target\sonar\scanner-report
20:28:06.461 Upload report
20:28:34.698 POST 500 https://SERVER_NAME/api/ce/submit?projectKey=PROJECT_KEY%3APROJECT_NAME&projectName=PROJECT_NAME | time=28237ms
20:28:34.734 stylelint-bridge server will shutdown
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 45:25 min
Finished at: 2021-03-17T20:28:34-05:00
Final Memory: 374M/2582M
------------------------------------------------------------------------
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar (default-cli) on project PROJECT_NAME: Failed to upload report - An error has occurred. Please contact your administrator -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar (default-cli) on project PROJECT_NAME: Failed to upload report - An error has occurred. Please contact your administrator
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to upload report - An error has occurred. Please contact your administrator
	at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:67)
	at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:108)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: Failed to upload report - An error has occurred. Please contact your administrator

Hi,

This is typically a question of allowed payload size in your internal firewall/proxy. Can you check with your network folks?

 
Ann

Could there be any compatibility issues between org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar and SonarQube Version 8.6 which could cause this?

Hi,

There really shouldn’t be. In fact, if your job gets as far as trying to upload the report - which is where your error is - they defacto, there isn’t. This really is about your network.

 
:woman_shrugging:
Ann

It was a SonarQube configuration issue and I got it resolved.

Hi,

Would you mind sharing the details for the benefit of posterity?

 
Ann

The configuration issue had something to do with the project key matching multiple permission templates. I’m not an admin so that’s all the details I know. This was somehow fixed which resolved the upload issue.

1 Like

Hi,

Thanks for sharing. To be clear, this was initial analysis & project creation?

 
Thx!
Ann

Yes it was.

1 Like

Thanks again for sharing.

Generally when you get a “failed to upload” error the problem is network related. I’ve referred this thread internally to see if we can’t improve the error message when the server does actually receive and then reject the analysis report.

 
:slightly_smiling_face:
Ann

Hi,

this should get logged in sonar.log or web.log as http error 503 with appropiate error message, had this already.

Gilbert