为什么 sonar-maven-plugin 在加载全局设置或活动规则时挂起? [英] Why does sonar-maven-plugin hang at loading global settings or active rules?

查看:68
本文介绍了为什么 sonar-maven-plugin 在加载全局设置或活动规则时挂起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在通过 sonar-maven-plugin 在 Jenkins 构建中运行 SQ 分析.多年来一切都很好.

We are running SQ analysis in Jenkins builds via sonar-maven-plugin. Everything fine for years.

但是自从几个星期以来,我们不时有无限挂起的构建.加载全局设置或活动规则时(或之后)没有进展.

But since some weeks from time to time we have builds which hang infinitely. No progress when (or after) loading global setting or active rules.

[20:23:11] [INFO] --- sonar-maven-plugin:3.5.0.1254:sonar (default-cli) @ commons-vaadin ---
[20:23:11] [INFO] User cache: /var/jenkins/.sonar/cache
[20:23:17] [INFO] SonarQube version: 7.0.0
[20:23:17] [INFO] Default locale: "en_US", source code encoding: "UTF-8"
[20:23:18] [INFO] Publish mode
[20:23:18] [INFO] Load global settings

在其他情况下它会挂起

[12:31:32] [INFO] Load active rules

我们几乎同时升级到 java 10,但我没有发现有关声纳插件和 java 10 的任何问题.

We upgraded to java 10 at about the same time, but I did not find any issues regarding sonar plugin und java 10.

推荐答案

看起来 sonar-scanner-engine-shaded 中的 okhttp 版本 3.8.1 导致了挂起.

It looks like the okhttp version 3.8.1 in sonar-scanner-engine-shaded has caused the hangs.

https://github.com/square/okhttp/issues/3422

手动替换 s​​onar-scanner-engine-shaded 中的 okhttp 类后,我们不再挂起.

After manually replacing the okhttp classes in sonar-scanner-engine-shaded we had no more hangs.

此问题在 SonarQube 上进行了跟踪:https://jira.sonarsource.com/browse/SONAR-11487

This issue is tracked at SonarQube here: https://jira.sonarsource.com/browse/SONAR-11487

这篇关于为什么 sonar-maven-plugin 在加载全局设置或活动规则时挂起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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