/batch/project (SonarQube 4.5) 读取超时 [英] Read timed out on /batch/project (SonarQube 4.5)

查看:17
本文介绍了/batch/project (SonarQube 4.5) 读取超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力解决以下问题.

I am struggling with the following problem.

在 Jenkins 中执行 sonar-runner 时的日志.

Log of the executed when sonar-runner in Jenkins.

SonarQube Runner 2.4
Java 1.7.0_67 Oracle Corporation (64-bit)
Windows 7 6.1 amd64
SONAR_RUNNER_OPTS=-Xms256m -Xmx512m
INFO: Runner configuration file: D:CI_BUILDsonar-runner-2.4confsonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "ko_KR", source code encoding: "UTF-8"
INFO: Work directory: D:CI_BUILDjenkins_homejobsCAFE-CLIENTworkspace.sonar
INFO: SonarQube Server 4.5
05:17:52.119 INFO  - Load global referentials...
05:17:53.382 INFO  - Load global referentials done: 1263 ms
05:17:53.414 INFO  - User cache: C:Userspcms_build.sonarcache
05:17:53.445 INFO  - Install plugins
05:17:54.225 INFO  - Install JDBC driver
05:17:54.303 INFO  - Create JDBC datasource for jdbc:jtds:sqlserver://10.240.232.145/sonardb;SelectMethod=Cursor
05:17:56.222 INFO  - Initializing Hibernate
05:17:59.217 INFO  - Load project referentials...
05:18:19.232 INFO  - Load project referentials done: 20015 ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 34.757s
Final Memory: 21M/291M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Unable to request: /batch/project?key=CAFE-CLIENT&preview=false
ERROR: Caused by: Read timed out
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.
Build step 'Invoke Standalone Sonar Analysis' marked build as failure

05:18:19.232 INFO - 加载项目引用完成:20015 ms

05:18:19.232 INFO - Load project referentials done: 20015 ms

当加载项目引用完成"值大于 20,000 毫秒时,

When "Load project referentials done" value is larger than 20,000 ms,

总是出现读取超时".

推荐答案

加载项目引用预计不会超过几秒钟.您的 SQ 服务器(或数据库)很可能存在性能问题.以下是一些可能会增加此网络服务持续时间的标准:

Loading of project referentials is not expected to take more than a few seconds. It is very likely you have a performance issue on your SQ server (or with your DB). Here are some criteria that may increase duration of this web service:

  • 您安装了很多语言插件,或者您在质量配置文件中启用了很多规则
  • 您的项目是一个包含很多模块的多模块项目

例如比较:http://nemo.sonarqube.org/batch/project?key=org.codehaus.sonar%3Asonar&preview=true

返回超过 1000 条规则和 33 个模块.返回数据的时间不到 2 秒.

that returns more than 1000 rules and 33 modules. It takes less than 2 seconds to return data.

似乎存在一些 SQL 问题,具体取决于您的数据库供应商.请参阅 http://jira.codehaus.org/browse/SONAR-5849http://jira.codehaus.org/browse/SONAR-6063.应该在即将到来的 4.5.3 中修复

it seems there was some SQL issues depending on your DB vendor. See http://jira.codehaus.org/browse/SONAR-5849 and http://jira.codehaus.org/browse/SONAR-6063. Should be fixed in upcoming 4.5.3

这篇关于/batch/project (SonarQube 4.5) 读取超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆