I have SonarQube 5.1 installed with sonar-runner 2.4, using Oracle database. When running sonar-runner on my project the analysis goes well and all steps until publishing the report is without problem, but then the logger gives me this:
08:04:45.705 INFO - Sensor JavaSquidSensor (done) | time=147026ms
08:04:45.705 INFO - Sensor Lines Sensor
08:04:46.007 INFO - Sensor Lines Sensor (done) | time=302ms
08:04:46.008 INFO - Sensor QProfileSensor
08:04:46.016 INFO - Sensor QProfileSensor (done) | time=8ms
08:04:46.017 INFO - Sensor InitialOpenIssuesSensor
08:04:46.363 INFO - Sensor InitialOpenIssuesSensor (done) | time=346ms
08:04:46.364 INFO - Sensor ProjectLinksSensor
08:04:46.474 INFO - Sensor ProjectLinksSensor (done) | time=110ms
08:04:46.475 INFO - Sensor VersionEventsSensor
08:04:46.908 INFO - Sensor VersionEventsSensor (done) | time=433ms
08:04:46.909 INFO - Sensor SurefireSensor
08:04:46.911 INFO - parsing /app/aim/jenkinsNew/jobs/Unit Testing with Code Coverage (DEV)/workspace/download/Omegapoint/.sonar/build/surefire-reports
08:04:46.911 WARN - Reports path not found: /app/aim/jenkinsNew/jobs/Unit Testing with Code Coverage (DEV)/workspace/download/Omegapoint/.sonar/build/surefire-reports
08:04:46.912 INFO - Sensor SurefireSensor (done) | time=3ms
08:04:46.912 INFO - Sensor SCM Sensor
08:04:46.912 INFO - No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
08:04:46.912 INFO - Sensor SCM Sensor (done) | time=0ms
08:04:46.912 INFO - Sensor CPD Sensor
08:04:46.912 INFO - JavaCpdEngine is used for java
08:04:46.915 INFO - Cross-project analysis disabled
08:04:53.913 INFO - Sensor CPD Sensor (done) | time=7001ms
08:04:53.917 INFO - No quality gate is configured.
08:04:55.523 INFO - Execute decorators...
08:05:13.250 INFO - Store results in database
08:05:39.050 INFO - Analysis reports generated in 2135ms, dir size=1 MB
08:05:42.067 INFO - Analysis reports compressed in 3016ms, zip size=927 KB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 4:09.242s
Final Memory: 26M/230M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Fail to execute request [code=500, url=http://XXX.XXX.XXX.XXX:9010/api/computation/submit_report?projectKey=SonarCube-report]: {"errors":[{"msg":"Fail to store analysis report of project SonarCube-report"}]}
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
The server SonarQube log sonar.log gives a long output (truncated here):
2015.06.05 08:58:41 ERROR web[o.s.s.w.WebServiceEngine] Fail to process request http://XXX.XXX.XXX.XXX:9010/api/computation/submit_report?projectKey=SonarCube-report
java.lang.IllegalStateException: Fail to store analysis report of project SonarCube-report
at org.sonar.server.computation.ReportQueue.add(ReportQueue.java:67) ~[sonar-server-5.1.jar:na]
at org.sonar.server.computation.ws.SubmitReportWsAction.handle(SubmitReportWsAction.java:75) ~[sonar-server-5.1.jar:na]
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:84) ~[sonar-server-5.1.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95) ~[na:1.7.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56) ~[na:1.7.0]
at java.lang.reflect.Method.invoke(Method.java:620) ~[na:2.6 (12-15-2014)]
and
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157) [na:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627) [na:1.7.0]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.18.jar:8.0.18]
at java.lang.Thread.run(Thread.java:863) [na:1.7.0]
Caused by: java.io.IOException: not opened for reading
at org.jruby.util.io.ChannelStream.checkReadable(ChannelStream.java:134) ~[jruby-complete-1.7.9.jar:na]
at org.jruby.util.io.ChannelStream.bufferedRead(ChannelStream.java:994) ~[jruby-complete-1.7.9.jar:na]
at org.jruby.util.io.ChannelStream.access$300(ChannelStream.java:62) ~[jruby-complete-1.7.9.jar:na]
at org.jruby.util.io.ChannelStream$InputStreamAdapter.read(ChannelStream.java:1570) ~[jruby-complete-1.7.9.jar:na]
at java.io.InputStream.read(InputStream.java:114) ~[na:1.7.0]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792) ~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769) ~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744) ~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.copyInputStreamToFile(FileUtils.java:1512) ~[commons-io-2.4.jar:2.4]
at org.sonar.server.computation.ReportQueue.saveReportOnDisk(ReportQueue.java:88) ~[sonar-server-5.1.jar:na]
at org.sonar.server.computation.ReportQueue.add(ReportQueue.java:61) ~[sonar-server-5.1.jar:na]
... 357 common frames omitted
I have double-checked that the database contains all sonar tables and data, and that it is reachable. Since I get this far in the process I suppose that connecting to the database is not problem? Any suggestions what to do?
Since I can't comment (need more "reputation" on stackoverflow) here's what I'm thinking:
First, I believe you're right that it isn't a database issue. This seems to be an issue with the server gathering the stored data.
So to resolve this, please check these things:
Let me know what you find.