Sonar Scanner Timeout

Hi,

I have a large Maven Java project I am trying to setup with SonarQube using the Sonar Scaner maven plugin. The problem I am experiencing is that we are getting a timeout error as follows:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42:52 min
[INFO] Finished at: 2021-05-10T10:40:43+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project xxxxxx: Can not execute Findbugs with a timeout threshold value of 1200000 milliseconds: TimeoutException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project xxxxxx: Can not execute Findbugs with a timeout threshold value of 1200000 milliseconds

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)

I have already increased the timeout in Sonar with the same result.

The Maven command I am using (from a Gitlab CI script) is as follows:

  • mvn -e $MAVEN_CLI_OPTS sonar:sonar --log-file target/xxxxxx_review.log
    -Dsonar.projectKey=XXXXXXXX_AXkcrf6PYX3_le5yGprc
    -Dsonar.host.url=$SONAR_HOST_URL
    -Dsonar.login=$SONAR_TOKEN
    -Dsonar.ce.javaOpts=-Xmx8096m -Xms8096m

I have also tried excluding files, for example I even tried excluding all java code but got the same result:
-Dsonar.exclusions=src/main/java/**

We have other projects (smaller) which we have successfully integrated with Sonar, its just this one we cannot get to work presumably due to its size.

The version of SonarQube is:
Developer Edition
Version 8.9 (build 43852)

Thanks

Hi,

Welcome to the community!

I’ve just checked the docs & the only parameter I see on the SonarQube side related to timeouts is this one:

sonar.ws.timeout Maximum time to wait for the response of a Web Service call (in seconds).

I’m not sure that’s relevant in this case since you’re not waiting for a web service. I guess you increased a Maven timeout?

At any rate, the FindBugs plugin & rules are provided by community maintainers & not something we can help much with.

Normally I might recommend that you gradually disable a few of the FB rules at a time until the timing was successful, but it seems that when you have the FindBugs plugin on board, all the rules will be run at each analysis regardless of how many of the rules - if any - are enabled in your profile.

 
:woman_shrugging:
Ann

Thanks Ann, I shall look into this.

A post was split to a new topic: FindBugs timeout fails analysis