声纳错误超时试图锁定 table "PROJECT_MEASURES"; SQL声明:
sonar ERROR Timeout trying to lock table "PROJECT_MEASURES"; SQL statement:
我正在使用 SonarQube 5.1(使用默认数据库 H2)和 Gradle 2.3/4。
在 SonarQube 中,我正在使用 Views 投资组合管理插件的试用版,它(将 SonarQube 项目的指标作为一个组件组合在一起,并允许您创建视图,就像给定团队、部门、经理、所有应用程序项目下的所有项目一样, 所有服务项目等
sonarRunner 任务在 Gradle 中成功运行。分析完成后,我必须 运行 另一个命令来选择 "Views Portfolio plugin" 的最新分析,我每 2 分钟 运行 的命令(使用 Jenkins 作业)是:sonar-运行浏览量
sonarRunner 任务几天都运行良好,但今天我在 Jenkins 中看到一个错误。
知道我在这里遗漏了什么吗?
PS:它会在几分钟后自动运行,因为我每 2 分钟 运行 执行一次作业。
00:00:05.987 23:29:38.207 INFO - Load module settings
00:00:06.382 23:29:38.603 INFO - Load rules
00:00:07.456 23:29:39.677 INFO - Index files
00:00:07.463 23:29:39.683 INFO - 0 files indexed
00:00:07.913 23:29:40.134 INFO - Sensor ViewsSensor
00:00:09.935 23:29:42.155 WARN - SQL Error: 50200, SQLState: HYT00
00:00:09.935 23:29:42.156 ERROR - Timeout trying to lock table "PROJECT_MEASURES"; SQL statement:
00:00:09.935 select measuremod0_.id as id5_, measuremod0_.alert_status as alert2_5_, measuremod0_.alert_text as alert3_5_, measuremod0_.characteristic_id as characte4_5_, measuremod0_.measure_data as measure5_5_, measuremod0_.description as descript6_5_, measuremod0_.metric_id as metric7_5_, measuremod0_.person_id as person8_5_, measuremod0_.project_id as project9_5_, measuremod0_.rule_id as rule10_5_, measuremod0_.rule_priority as rule11_5_, measuremod0_.snapshot_id as snapshot12_5_, measuremod0_.tendency as tendency5_, measuremod0_.text_value as text14_5_, measuremod0_.url as url5_, measuremod0_.value as value5_, measuremod0_.variation_value_1 as variation17_5_, measuremod0_.variation_value_2 as variation18_5_, measuremod0_.variation_value_3 as variation19_5_, measuremod0_.variation_value_4 as variation20_5_, measuremod0_.variation_value_5 as variation21_5_ from project_measures measuremod0_ where measuremod0_.snapshot_id=? and (measuremod0_.person_id is null) [50200-176]
00:00:09.972 INFO: ------------------------------------------------------------------------
00:00:09.972 INFO: EXECUTION FAILURE
00:00:09.972 INFO: ------------------------------------------------------------------------
00:00:09.973 Total time: 9.802s
00:00:10.234 Final Memory: 43M/1448M
00:00:10.235 INFO: ------------------------------------------------------------------------
00:00:10.236 ERROR: Error during Sonar runner execution
00:00:10.237 ERROR: Unable to execute Sonar
00:00:10.237 ERROR: Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
00:00:10.237 ERROR: Caused by: could not execute query
00:00:10.238 ERROR: Caused by: Timeout trying to lock table "PROJECT_MEASURES"; SQL statement:
00:00:10.238 select measuremod0_.id as id5_, measuremod0_.alert_status as alert2_5_, measuremod0_.alert_text as alert3_5_, measuremod0_.characteristic_id as characte4_5_, measuremod0_.measure_data as measure5_5_, measuremod0_.description as descript6_5_, measuremod0_.metric_id as metric7_5_, measuremod0_.person_id as person8_5_, measuremod0_.project_id as project9_5_, measuremod0_.rule_id as rule10_5_, measuremod0_.rule_priority as rule11_5_, measuremod0_.snapshot_id as snapshot12_5_, measuremod0_.tendency as tendency5_, measuremod0_.text_value as text14_5_, measuremod0_.url as url5_, measuremod0_.value as value5_, measuremod0_.variation_value_1 as variation17_5_, measuremod0_.variation_value_2 as variation18_5_, measuremod0_.variation_value_3 as variation19_5_, measuremod0_.variation_value_4 as variation20_5_, measuremod0_.variation_value_5 as variation21_5_ from project_measures measuremod0_ where measuremod0_.snapshot_id=? and (measuremod0_.person_id is null) [50200-176]
00:00:10.238 ERROR:
00:00:10.239 ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
00:00:10.239 ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
00:00:10.271 Build step 'Execute shell' marked build as failure
对于这个项目,当我尝试在 SonarQube 中查看项目本身时,我看到以下黄色背景行:
No analysis has been performed since creation. The only available section is the configuration.
所有其他项目显示有效的 SonarQube 仪表板页面。
找到第一个问题的解决方案。我正在做一个关于使用 Views Portfolio 插件的 POC,它需要定期 运行 "sonar-runner views" 命令来 publish/fetch Views 的新数据。
有一个 Jenkins 作业 运行 每 2 分钟 "sonar-runner views" 并且与此同时,其他 Jenkins 作业(对于一个项目)正在做 sonarRunner(分析)然后这个错误来了。
为了解决它,我将 运行ning sonar-运行ner views 命令的作业更改为 NOT to 运行 if任何其他 Jenkins 作业正在进行中(作业配置中的限制复选框)。
现在我没有收到 SQL 错误。
我仍在研究为什么即使 sonarRunner 任务 (Gradle) 成功,它也没有在 SonarQube 主页中生成特定项目。
即我得到:
No analysis has been performed since creation. The only available section is the configuration.
PS: 所有其他项目的 sonarRunner 任务显示同样成功 运行 并且它们在 SonarQube 中可见。
找到第二个问题的解决方案,即
解决“自创建以来未执行任何分析。唯一可用的部分是配置".
我发现几天前我更新了几个插件(即声纳-api 插件等从 X.X 到 X.Y 版本)但他们都坐在 等待安装状态 即在我下载它们之后,我没有重新启动声纳实例来选择它们。
我刚刚重启了声纳实例,错误消失了,现在一切正常。
我正在使用 SonarQube 5.1(使用默认数据库 H2)和 Gradle 2.3/4。
在 SonarQube 中,我正在使用 Views 投资组合管理插件的试用版,它(将 SonarQube 项目的指标作为一个组件组合在一起,并允许您创建视图,就像给定团队、部门、经理、所有应用程序项目下的所有项目一样, 所有服务项目等
sonarRunner 任务在 Gradle 中成功运行。分析完成后,我必须 运行 另一个命令来选择 "Views Portfolio plugin" 的最新分析,我每 2 分钟 运行 的命令(使用 Jenkins 作业)是:sonar-运行浏览量
sonarRunner 任务几天都运行良好,但今天我在 Jenkins 中看到一个错误。
知道我在这里遗漏了什么吗?
PS:它会在几分钟后自动运行,因为我每 2 分钟 运行 执行一次作业。
00:00:05.987 23:29:38.207 INFO - Load module settings
00:00:06.382 23:29:38.603 INFO - Load rules
00:00:07.456 23:29:39.677 INFO - Index files
00:00:07.463 23:29:39.683 INFO - 0 files indexed
00:00:07.913 23:29:40.134 INFO - Sensor ViewsSensor
00:00:09.935 23:29:42.155 WARN - SQL Error: 50200, SQLState: HYT00
00:00:09.935 23:29:42.156 ERROR - Timeout trying to lock table "PROJECT_MEASURES"; SQL statement:
00:00:09.935 select measuremod0_.id as id5_, measuremod0_.alert_status as alert2_5_, measuremod0_.alert_text as alert3_5_, measuremod0_.characteristic_id as characte4_5_, measuremod0_.measure_data as measure5_5_, measuremod0_.description as descript6_5_, measuremod0_.metric_id as metric7_5_, measuremod0_.person_id as person8_5_, measuremod0_.project_id as project9_5_, measuremod0_.rule_id as rule10_5_, measuremod0_.rule_priority as rule11_5_, measuremod0_.snapshot_id as snapshot12_5_, measuremod0_.tendency as tendency5_, measuremod0_.text_value as text14_5_, measuremod0_.url as url5_, measuremod0_.value as value5_, measuremod0_.variation_value_1 as variation17_5_, measuremod0_.variation_value_2 as variation18_5_, measuremod0_.variation_value_3 as variation19_5_, measuremod0_.variation_value_4 as variation20_5_, measuremod0_.variation_value_5 as variation21_5_ from project_measures measuremod0_ where measuremod0_.snapshot_id=? and (measuremod0_.person_id is null) [50200-176]
00:00:09.972 INFO: ------------------------------------------------------------------------
00:00:09.972 INFO: EXECUTION FAILURE
00:00:09.972 INFO: ------------------------------------------------------------------------
00:00:09.973 Total time: 9.802s
00:00:10.234 Final Memory: 43M/1448M
00:00:10.235 INFO: ------------------------------------------------------------------------
00:00:10.236 ERROR: Error during Sonar runner execution
00:00:10.237 ERROR: Unable to execute Sonar
00:00:10.237 ERROR: Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
00:00:10.237 ERROR: Caused by: could not execute query
00:00:10.238 ERROR: Caused by: Timeout trying to lock table "PROJECT_MEASURES"; SQL statement:
00:00:10.238 select measuremod0_.id as id5_, measuremod0_.alert_status as alert2_5_, measuremod0_.alert_text as alert3_5_, measuremod0_.characteristic_id as characte4_5_, measuremod0_.measure_data as measure5_5_, measuremod0_.description as descript6_5_, measuremod0_.metric_id as metric7_5_, measuremod0_.person_id as person8_5_, measuremod0_.project_id as project9_5_, measuremod0_.rule_id as rule10_5_, measuremod0_.rule_priority as rule11_5_, measuremod0_.snapshot_id as snapshot12_5_, measuremod0_.tendency as tendency5_, measuremod0_.text_value as text14_5_, measuremod0_.url as url5_, measuremod0_.value as value5_, measuremod0_.variation_value_1 as variation17_5_, measuremod0_.variation_value_2 as variation18_5_, measuremod0_.variation_value_3 as variation19_5_, measuremod0_.variation_value_4 as variation20_5_, measuremod0_.variation_value_5 as variation21_5_ from project_measures measuremod0_ where measuremod0_.snapshot_id=? and (measuremod0_.person_id is null) [50200-176]
00:00:10.238 ERROR:
00:00:10.239 ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
00:00:10.239 ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
00:00:10.271 Build step 'Execute shell' marked build as failure
对于这个项目,当我尝试在 SonarQube 中查看项目本身时,我看到以下黄色背景行:
No analysis has been performed since creation. The only available section is the configuration.
所有其他项目显示有效的 SonarQube 仪表板页面。
找到第一个问题的解决方案。我正在做一个关于使用 Views Portfolio 插件的 POC,它需要定期 运行 "sonar-runner views" 命令来 publish/fetch Views 的新数据。
有一个 Jenkins 作业 运行 每 2 分钟 "sonar-runner views" 并且与此同时,其他 Jenkins 作业(对于一个项目)正在做 sonarRunner(分析)然后这个错误来了。
为了解决它,我将 运行ning sonar-运行ner views 命令的作业更改为 NOT to 运行 if任何其他 Jenkins 作业正在进行中(作业配置中的限制复选框)。
现在我没有收到 SQL 错误。
我仍在研究为什么即使 sonarRunner 任务 (Gradle) 成功,它也没有在 SonarQube 主页中生成特定项目。
即我得到:
No analysis has been performed since creation. The only available section is the configuration.
PS: 所有其他项目的 sonarRunner 任务显示同样成功 运行 并且它们在 SonarQube 中可见。
找到第二个问题的解决方案,即
解决“自创建以来未执行任何分析。唯一可用的部分是配置".
我发现几天前我更新了几个插件(即声纳-api 插件等从 X.X 到 X.Y 版本)但他们都坐在 等待安装状态 即在我下载它们之后,我没有重新启动声纳实例来选择它们。
我刚刚重启了声纳实例,错误消失了,现在一切正常。