带Sonar runner的SonarQube无法存储报告

带Sonar runner的SonarQube无法存储报告,sonarqube,sonar-runner,Sonarqube,Sonar Runner,我使用Oracle数据库安装了SonarQube 5.1和sonar runner 2.4。在我的项目中运行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

我使用Oracle数据库安装了SonarQube 5.1和sonar runner 2.4。在我的项目中运行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 log sonar.log提供长输出(此处截断):

我已经仔细检查了数据库是否包含所有声纳表和数据,并且可以访问。既然我在这个过程中走了这么远,我想连接到数据库不是问题吧?有什么建议吗?

因为我无法发表评论(需要更多关于stackoverflow的“声誉”),所以我想:

首先,我相信你是对的,这不是一个数据库问题。这似乎是服务器收集存储数据时出现的问题

因此,要解决此问题,请检查以下事项:

  • 在声纳分析运行时,检查服务器的端口9010是否打开/可用
  • 检查sonar.properties文件,了解如何配置web服务器
  • 检查wrapper.conf文件
  • 检查你的access.log

  • 请告诉我您发现了什么。

    我在SonarQube服务器上遇到了类似的问题。根本原因是iNode计数。SonarQube目录下有几百万个文件。我删除了这个tmp下的所有文件以释放inode&并重新启动了它。inode计数(df-ih)看起来正常,SQ开始正常工作

    您能提供服务器日志吗?我在问题中添加了服务器输出。对于第一个错误(无法处理..),几百行,这是一个巨大的堆栈跟踪。
    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