Sonarqube Android Gradle - Upload of analysis report fails for larger payload

android
sonarqube

(Droid Apps) #1

Sonarqube analysis runs well from android studio. During the upload it fails for larger payloads(7 MB) , but it uploads when the payload is smaller like 30kb. I have tried H2 , Postgres , Mysql databases, implemented all timeout. I have tried sonarqube 6.5 and 7 versions on Windows 10.

Sonarqube web.log file

Can't read file part for parameter report
java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException
at org.apache.catalina.connector.Request.parseParts(Request.java:2911)
at org.apache.catalina.connector.Request.parseParameters(Request.java:3211)
at org.apache.catalina.connector.Request.getParameter(Request.java:1137)

Analysis Report logs

> CPD calculation finished 
> Task :sonarqube 
> Analysis report generated in 15567ms, dir size=23 MB 
> Analysis reports compressed in 15471ms, zip size=7 MB 
> Failed to delete temp folder java.nio.file.DirectoryNotEmptyException: C:\Users\XXXXXX\build\sonar.sonartmp at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1165) at org.sonar.api.utils.internal.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:121) at org.sonar.api.utils.internal.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:110) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742)

Also following error

 Error during SonarQube Scanner execution
java.lang.IllegalStateException: Fail to request http://localhost:9000/api/ce/submit?projectKey=

(Nicolas Bontoux) #2

Hi there,

What’s failing here is apparently the HTTP transaction between scanner and server (then processing a Background Task) so it’s possible that this is independent from any database consideration (echoing what you’ve tried) and rather relates to networking aspects.

For starters I would recommend getting the debug logs of your analysis (sonar.verbose=true) and collecting the complete stacktrace of the error. This might better indicate a precise problem, and at the same time you can cross-check any proxy/firewall behaviour that might interfere.


(Droid Apps) #3

Hi Nicolas,

Thank you for your response. I have also been looking into the networking aspects of the issue. Will let you know if any issues further.

Thanks