Unable to upload report after scan and no projects shown

Sonarqube version -Community 8.9.7.52159 (Running on kube cluster)
Scanner Version -4.6.2.2472
We have setup a new dev instance on kubernetes by taking a snapshot of db from our existing prod server instance. Couple of issues observed

  1. Project Dashboard is empty but I can view the projects when I search using the project key in search bar and also under administration > projects > management. Tried removing the /data/es7 directory after following the threads in the community but that did not help.
  2. Our Jenkins server is able to run the scans but fails to upload the report. Error log below
  20:51:36.188 DEBUG: Upload report
  20:51:36.259 DEBUG: POST 400 https://sonarqube.xxx.com| time=70ms
  20:51:36.279 INFO: ------------------------------------------------------------------------
  20:51:36.279 INFO: EXECUTION FAILURE
  20:51:36.279 INFO: ------------------------------------------------------------------------
  20:51:36.279 INFO: Total time: 12.165s
  20:51:36.411 INFO: Final Memory: 21M/211M
  20:51:36.412 INFO: ------------------------------------------------------------------------
  20:51:36.412 ERROR: Error during SonarScanner execution
  java.lang.IllegalStateException: closed
  	at okio.RealBufferedSource.select(RealBufferedSource.kt:218)
  	at okhttp3.internal.Util.readBomAsCharset(Util.kt:258)
  	at okhttp3.ResponseBody.string(ResponseBody.kt:187)
  	at org.sonarqube.ws.client.OkHttpResponse.content(OkHttpResponse.java:81)
  	at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:34)
  	at org.sonar.scanner.bootstrap.DefaultScannerWsClient.failIfUnauthorized(DefaultScannerWsClient.java:112)
  	at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:75)
  	at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:204)
  	at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:141)
  	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:365)
  	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
  	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
  	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:150)
  	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
  	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
  	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
  	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
  	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
  	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:189)
  	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
  	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
  	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
  	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Unable to locate 'report-task.txt' in the workspace.

Noticed that report-task.txt is not generated under .scannerwork directory
Appreciate any suggestions or feedback ?

Hi,

Could we have the full analysis log?

 
Ann

@ganncamp here it is
Jenkins-SonarAnalysis.log (37.5 KB)

Hi,

Thanks for providing the log. I was hoping there would be some additional piece of data that shed light on this. There was not.

What I’m left with is that a 400 is a “bad request”. From Mozilla.)

the server cannot or will not process the request due to something that is perceived to be a client error

I’ve never seen SonarQube give a 400 response code on analysis report submission. So I’m left wondering if you have something in the middle, e.g. a proxy, that’s blocking the request.

Nine times out of ten, when there’s a problem submitting the analysis report, there is something on the network, e.g. a proxy, that’s blocking the analysis report submission. You should check with your network folks.

 
Ann

@ganncamp Could you please help to comment on the below as well

  1. Project Dashboard is empty but I can view the projects when I search using the project key in search bar and also under administration > projects > management. Tried removing the /data/es7 directory after following the threads in the community but that did not help.

Hi,

We try to keep it to one question per thread. Otherwise it gets messy.

Please create a new thread for the second question.

 
Ann

sure, I will create a new thread.

-Varun

Thank you. It was WAF that is blocking attachments. Sonar Scanner is able to upload reports now.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.