Why does sonar-maven-plugin hang at loading global settings or active rules?

喜你入骨 提交于 2021-02-10 16:49:30

问题


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

In other cases it hangs on

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

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


回答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

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

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



来源:https://stackoverflow.com/questions/52850594/why-does-sonar-maven-plugin-hang-at-loading-global-settings-or-active-rules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!