deepy / sonar-crowd

GNU Lesser General Public License v3.0
32 stars 37 forks source link

Sonarqube startup stop after trying to initializing the Crowd Plugin #24

Closed evanerwee closed 5 years ago

evanerwee commented 5 years ago

This is a test environment. Latest version of Atlassian Crowd deployed. Latest version of Sonatqube. We have several services in the LAB and all of them successful connect to Crowd. Sonarqube service is binding to 127.0.0.1. We use Nginx for HTTPS connection (All that is working if we disable the plugin.) Crowd is also HTTPS. We deployed Sonatype Nexus on the same server as Sonarqube and all integration to Crowd is successful.

We cannot find the problem anywhere. Any help will be greatly appreciated.

web.log we get

2019.04.14 19:46:43 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 80 2019.04.14 19:46:45 INFO web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy) 2019.04.14 19:46:48 INFO web[][o.s.s.s.LogServerId] Server ID: 60CD2962-AWQYYfjXHq7gKnSnSBMY 2019.04.14 19:46:48 INFO web[][org.sonar.INFO] Security realm: Crowd 2019.04.14 19:46:48 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'application.name' : 'sonar' 2019.04.14 19:46:48 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: application.login.url 2019.04.14 19:46:48 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.tokenkey' : 'session.tokenkey' 2019.04.14 19:46:48 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.lastvalidation' : 'session.lastvalidation' 2019.04.14 19:46:48 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.validationinterval' : '1' 2019.04.14 19:46:48 INFO web[][c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: cookie.domain 2019.04.14 19:46:48 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube java.lang.NoClassDefFoundError: javax/xml/bind/JAXB at com.atlassian.crowd.integration.rest.service.RestExecutor.setBody(RestExecutor.java:204) at com.atlassian.crowd.integration.rest.service.RestExecutor.post(RestExecutor.java:176) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchUsers(RestCrowdClient.java:511) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.testConnection(RestCrowdClient.java:500) at org.sonar.plugins.crowd.CrowdRealm.init(CrowdRealm.java:97) at org.sonar.server.user.SecurityRealmFactory.start(SecurityRealmFactory.java:87) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) 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:573) 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:844) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXB at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39) at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87) at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76) ... 30 common frames omitted 2019.04.14 19:46:49 INFO web[][o.s.p.StopWatcher] Stopping process

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

sonar.properties

sonar.security.realm=Crowd crowd.url=https://crowd01.contino.tech.int/Crowd/ crowd.application=sonar crowd.password= crowd.password=

evanerwee commented 5 years ago

We have abandon Sonarqube to Crowd integration. We simple cant get the integration between SonarQube 7.7 and Crowd 3.4 to work.

deepy commented 5 years ago

@evanerwee what version of java are you running sonarqube with? From the exception it looks like you might be on 9 or later and sonarqube only supports 8.

asyslinux commented 5 years ago

I confirm, SonarQube 7.7 not working with Crowd Authenticator Plugin.

openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-2~deb9u1-b03) OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

Errors starting from:


2019.06.01 04:30:55 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Unable to load component class org.sonar.server.platform.ws.SystemWs
        at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
        at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)

Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.server.platform.ws.InfoAction
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)

Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.server.platform.ws.StandaloneSystemInfoWriter
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)

Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.server.platform.monitoring.StandaloneSystemSection
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)

Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.server.user.SecurityRealmFactory
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)

Caused by: org.sonar.api.utils.SonarException: Authenticator 'org.sonar.plugins.crowd.CrowdAuthenticator' not found. Please check the property 'sonar.authenticator.class' in conf/sonar.properties
at org.sonar.server.user.SecurityRealmFactory.(SecurityRealmFactory.java:61)
at org.sonar.server.user.SecurityRealmFactory.(SecurityRealmFactory.java:74)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:145)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:342)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
... 88 common frames omitted
2019.06.01 04:30:55 INFO web[][o.s.p.StopWatcher] Stopping process```
deepy commented 5 years ago

This has been fixed in 2.1.2 which is available on github release and should hopefully soon appear on the marketplace :-) https://community.sonarsource.com/t/new-release-crowd-plugin-2-1-2/10386

shivendrakd commented 5 years ago

Hi ,

I am using crowd 2.1.2 plugin only in SOnarQube 7.9 I am still getting same error. Any help in SoanrQube-Crowd issue wiil be appreciated.

2019.07.05 12:35:33 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube java.lang.NoClassDefFoundError: javax/xml/bind/JAXB at com.atlassian.crowd.integration.rest.service.RestExecutor.setBody(RestExecutor.java:204) at com.atlassian.crowd.integration.rest.service.RestExecutor.post(RestExecutor.java:176) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchUsers(RestCrowdClient.java:511) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.testConnection(RestCrowdClient.java:500) at org.sonar.plugins.crowd.CrowdRealm.init(CrowdRealm.java:97)

shivendrakd commented 5 years ago

This has been fixed in 2.1.2 which is available on github release and should hopefully soon appear on the marketplace :-) https://community.sonarsource.com/t/new-release-crowd-plugin-2-1-2/10386

Hi ,

I am using crowd 2.1.2 plugin only in SOnarQube 7.9 I am still getting same error. Any help in SoanrQube-Crowd issue wiil be appreciated.

2019.07.05 12:35:33 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube java.lang.NoClassDefFoundError: javax/xml/bind/JAXB at com.atlassian.crowd.integration.rest.service.RestExecutor.setBody(RestExecutor.java:204) at com.atlassian.crowd.integration.rest.service.RestExecutor.post(RestExecutor.java:176) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchUsers(RestCrowdClient.java:511) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.testConnection(RestCrowdClient.java:500) at org.sonar.plugins.crowd.CrowdRealm.init(CrowdRealm.java:97)

deepy commented 5 years ago

@shivendrakd there's already an open issue for that (which is different to this issue)