0

我们已将 sonarqube 从 7.4 升级到 7.9.1,我们需要将 sonar-crowd 插件从 2.1.1 升级到 2.1.3。

升级后,声纳应用程序在没有 Crowd 配置的情况下按预期启动。但是在与人群一起启动时,它在启动时失败了。

这是声纳属性上的人群配置

#-------------------
  # Sonar Crowd Plugin
  #-------------------


  # To first try to authenticate against the external sytem.
  # If the external system is not reachable or if the user is not defined in the external system, the authentication will be performed through the SonarQube internal system.
  sonar.security.realm=Crowd

  # URL of the Crowd server.
  crowd.url=https://mycompany:8443/crowd/


  # Crowd application name.
  # Default is 'sonar'.
  crowd.application=sonar


  # Crowd application password.
  crowd.password=password

  # Crowd group sync
  crowd.groups.sync=true

  # Don't use crowd for sonar account
  sonar.security.localUsers=admin,sonar

  # Don't save passwords incase Crowd is down
  sonar.security.savePassword=false


  # Don't create users, they must come from Crowd
  sonar.authenticator.createUsers=false

sonar-crowd 2.1.3 是否有任何依赖插件?这是最新 sonarqube 版本(7.9.1)的网络日志错误

2019.11.15 21:19:13 INFO web[][org.sonar.INFO] Security realm: Crowd
2019.11.15 21:19:13 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'application.name' : 'sonar'
2019.11.15 21:19:13 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: application.login.url
2019.11.15 21:19:13 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.tokenkey' : 'session.tokenkey'
2019.11.15 21:19:13 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.lastvalidation' : 'session.lastvalidation'
2019.11.15 21:19:13 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.validationinterval' : '1'
2019.11.15 21:19:13 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: cookie.domain
2019.11.15 21:19:13 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.api.utils.SonarException: Security realm fails to start: Unable to test connection to crowd
at org.sonar.server.user.SecurityRealmFactory.start(SecurityRealmFactory.java:93)
at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:545)
at org.sonar.server.platform.Platform.start(Platform.java:211)
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:185)
at org.sonar.server.platform.Platform.access$500(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.sonar.api.utils.SonarException: Unable to test connection to crowd
at org.sonar.plugins.crowd.CrowdRealm.init(CrowdRealm.java:106)
at org.sonar.server.user.SecurityRealmFactory.start(SecurityRealmFactory.java:87)

任何建议将不胜感激。谢谢

4

1 回答 1

0

从日志中,我注意到它在 Crowd 上的连接失败。

2019.11.15 21:19:13 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.api.utils.SonarException: Security realm fails to start: Unable to test connection to crowd

因此,将 Sonarqube APP 服务器 IP 地址列入白名单并解决了该问题。

于 2019-12-03T21:18:25.380 回答