Bitbucket PR analysis failing due to 555 error

scanner

(nandeesh) #1

Hi Team,

Please help me on this ,im getting error in sonarqube scanner when the PR job has triggered.As its unable to analyze the pull requests but its intermittent.

im using sonarqube server as 6.5
SonarQube Scanner 2.6.1
nodejs plugin --10.12

im getting error like unable to respond in time as well 555 error.

Note: This is intermittent.

6 < Content-Length: 68
6 < X-OAuth-Scopes: pullrequest:write, account
6 < X-Request-Count: 305
6 < Content-Type: application/json; charset=utf-8
6 <
{“type”: “error”, “error”: {“message”: “Unable to respond in time”}}

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 27.571s
INFO: Final Memory: 51M/858M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
com.sun.jersey.api.client.UniformInterfaceException: GET https://api.bitbucket.org/2.0/repositories/m/dat/diff/from_pullrequest_id=76&context=0 returned a response status of 555 null
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686)
at com.sun.jersey.api.client.WebResource.get(WebResource.java:191)
at ch.mibex.bitbucket.sonar.client.BitbucketClient.getPullRequestDiff(BitbucketClient.scala:197)
at ch.mibex.bitbucket.sonar.diff.IssuesOnChangedLinesFilter.filter(IssuesOnChangedLinesFilter.scala:15)
at ch.mibex.bitbucket.sonar.review.ReviewCommentsHandler.processIssues(ReviewCommentsHandler.scala:96)
at ch.mibex.bitbucket.sonar.review.ReviewCommentsHandler.updateComments(ReviewCommentsHandler.scala:33)
at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.ch$mibex$bitbucket$sonar$review$SonarReviewPostJob$$handlePullRequest(SonarReviewPostJob.scala:45)
at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$execute$1.apply(SonarReviewPostJob.scala:29)
at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$execute$1.apply(SonarReviewPostJob.scala:27)
at scala.collection.immutable.List.foreach(List.scala:381)
at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.execute(SonarReviewPostJob.scala:27)
at org.sonar.scanner.postjob.PostJobWrapper.executeOn(PostJobWrapper.java:58)
at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:66)
at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:84)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:179)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:261)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:256)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:245)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:119)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
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.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
at org.sonarsource.scanner.cli.Main.main(Main.java:60)
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE


(G Ann Campbell) #2

Hi,

Since you’re using 6.5, that means you’re using the no-longer-supported PR decoration. We’re not going to be able to help you much, and you should upgrade to at least 6.7.6 - the current LTS - at your earliest convenience.

That said, Google tells me that a 555 code from Bitbucket means

the diff was too large and timed out.

Since this endpoint does not employ any form of pagination, but instead returns the diff as a single document, it can run into trouble on very large diffs. If Bitbucket times out in cases like these, a 555 status code is returned.

So it sounds like you’re doing very large PRs. Probably the only hope for this is to make it more granular (many small PRs instead of a few large ones).

 
Ann


(nandeesh) #3

Thank you so much for your quick help.

If I upgrade to 6.7 and more ,will it going to resolve the issue or will it handle large files?

If yes then i will go with upgrade.


(G Ann Campbell) #4

Hi,

I doubt your SonarQube version has anything to do with your timeouts. That error is coming straight from BitBucket.

 
Ann


(nandeesh) #5

One more think its intermittent issue ,sometimes it will work ,but sometimes not.

what might be the reason ,do you think is it issue with Bitbucket.?


(G Ann Campbell) #6

Hi,

I’m quite sure the error is on the Bitbucket side.

 
Ann


(nandeesh) #7

Thank you…