我使用Oracle數據庫安裝SonarQube 5.1,安裝了sonar-runner 2.4。當運行在我的項目分析順利聲納亞軍和所有步驟,直到發佈的報告是沒有問題的,但隨後的記錄給了我這樣的:SonarQube與Sonar-runner無法存儲報告
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.
服務器SonarQube日誌sonar.log給出了一個長時間的輸出(這裏截斷):
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)]
和
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
我有雙重檢查,該數據庫包含所有聲納表和數據,而且它是可到達。既然我在這個過程中得到了這麼多,我想連接到數據庫不是問題?有什麼建議做什麼?
您能否提供服務器日誌? –
我在我的問題中添加了服務器輸出。這是第一個錯誤(無法處理..),幾百行的巨大堆棧跟蹤。 – hsalin