Sonarqube 7.9.1 is not starting up with sonar-crowd 2.1.3

We have upgraded sonarqube from 7.4 to 7.9.1 where we need to upgrade sonar-crowd plugin from 2.1.1 to 2.1.3.

After the upgrade, sonar application is starting up as expected without Crowd config. But while starting up with crowd, it fails at the start up.

Here is the crowd config on sonar properties.

    #-------------------
    # 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

Here is the web log error

        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)

Any suggestion would be much appreciated. Thanks

Hi,

Welcome to the community!

You might want to create an issue on that community plugin.

 
HTH,
Ann

Hi,
I have the same problem with the same version of this plugin.
crowd-plugins.2.1.3
Sonarqube 7.9.1

2020.01.23 14:56:01 INFO  web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'application.name' : 'sonar-prod'
2020.01.23 14:56:01 INFO  web[][c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: application.login.url
2020.01.23 14:56:01 INFO  web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.tokenkey' : 'session.tokenkey'
2020.01.23 14:56:01 INFO  web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.lastvalidation' : 'session.lastvalidation'
2020.01.23 14:56:01 INFO  web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.validationinterval' : '1'
2020.01.23 14:56:01 INFO  web[][c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: cookie.domain
2020.01.23 14:56:02 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.api.utils.SonarException: Security realm fails to start: The application is not permitted to perform the requested operation on the crowd server
	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)

Anyone have some suggestion… Thanks

Hi,

this is a community plugin, which is not supported by Sonarsource.
You need to create an issue in Github, Github account required.

1 Like

My issue was with crowd url. The IP was whitelisted. I have successfully done this upgrade on our Dev env. I’m not sure of your setup, but are you able to login as admin with crowd being disabled?

I was reviewing the config of Crowd and changed the “Remote adresses IP” for 0.0.0.0/0 and now it’s working.

Thanks.