Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Hudson 3.0.0 + Active Directory
Hudson 3.0.0 + Active Directory [message #997558] Tue, 08 January 2013 10:08 Go to next message
Dirk Hamm is currently offline Dirk HammFriend
Messages: 11
Registered: January 2013
Junior Member
Hi,

i am testing the new Release of Hudson (3.0.0) and have problems with
the connection to the Active Directory.
The Active Directory Plugin 1.17 does not work anymore. I get the following excepting during the start of Hudson.

Quote:
WARNING: Failed to create extension
Throwable occurred: java.lang.NoClassDefFoundError: org.acegisecurity.BadCredentialsException
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:516)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java
:85)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
at org.hudsonci.inject.internal.extension.SmoothieComponent.<init>(SmoothieComponent.java:45)
at org.hudsonci.inject.internal.extension.SmoothieExtensionLocator.locate(SmoothieExtensionLocator.java:72)
at org.hudsonci.inject.internal.plugin.SmoothiePluginStrategy.findComponents(SmoothiePluginStrategy.java:235)
at org.hudsonci.inject.internal.plugin.DelegatingPluginStrategy.findComponents(DelegatingPluginStrategy.java:74)


At the end i do not have the option AD at the Access Control/Security Realm.

So, is there a way to integrate this plugin or another way to integrate the active directory?

thx
Re: Hudson 3.0.0 + Active Directory [message #997729 is a reply to message #997558] Tue, 08 January 2013 16:05 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hi Dirk, I will fix this issue and release a new version of active-directory plugin for you to use.

Winston Prakash
Eclipse Hudson team
Re: Hudson 3.0.0 + Active Directory [message #998042 is a reply to message #997729] Wed, 09 January 2013 08:52 Go to previous messageGo to next message
Dirk Hamm is currently offline Dirk HammFriend
Messages: 11
Registered: January 2013
Junior Member
Thx a lot..
Re: Hudson 3.0.0 + Active Directory [message #998262 is a reply to message #998042] Wed, 09 January 2013 17:19 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hi Dirk, the issue was in Hudson 3.0.0 we switched old acegi security with latest Spring Security. I fixed the issue and created a local build of the plugin. I don't have immediate access to Active directory to test. Could you please test it for me before I release it. If so send me an e-mail at winstonDOTprakashATgmailDOTcom, I'll send you the hpi file for you to test


Winston Prakash
Eclipse Hudson team
Re: Hudson 3.0.0 + Active Directory [message #999278 is a reply to message #998262] Fri, 11 January 2013 18:03 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I have created a version 1.31-h1 for Hudson 3.0.0. Thanks to Andreas Magnusson for testing that version. Though there is an issue with Com4J, the plugin appears to work with non-native support.

Dirk please update via Plugin Center and let me know if it works for you.


Winston Prakash
Eclipse Hudson team
Re: Hudson 3.0.0 + Active Directory [message #1005019 is a reply to message #999278] Thu, 24 January 2013 10:27 Go to previous messageGo to next message
Reinhard Nägele is currently offline Reinhard NägeleFriend
Messages: 23
Registered: January 2013
Junior Member
After some trial and error I managed to get the Active Directory plugin working. However, the log says the type hudson.plugins.active_directory.ActiveDirectorySecurityRealm does not exist. The settings in hudson-security.xml seem to be correctly applied, even though there is a failure reading the file. I was upgrading from 2.1.2 with Active Directory plugin 1.17.

INFO: Home directory: /exports/home4/hudson/hudson-test/.hudson
Jan 24, 2013 11:13:13 AM hudson.util.RobustReflectionConverter doUnmarshal
WARNING: Skipping a non-existent type hudson.plugins.active_directory.ActiveDirectorySecurityRealm
Jan 24, 2013 11:13:13 AM org.eclipse.hudson.security.HudsonSecurityManager load
SEVERE: Failed to load /exports/home4/hudson/hudson-test/.hudson/hudson-security.xml
hudson.util.IOException2: Unable to read /exports/home4/hudson/hudson-test/.hudson/hudson-security.xml
	at hudson.XmlFile.unmarshal(XmlFile.java:140)
	at org.eclipse.hudson.security.HudsonSecurityManager.load(HudsonSecurityManager.java:366)
	at org.eclipse.hudson.security.HudsonSecurityManager.<init>(HudsonSecurityManager.java:143)
	at org.eclipse.hudson.HudsonServletContextListener.contextInitialized(HudsonServletContextListener.java:206)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:771)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:411)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:247)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1238)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:480)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
	at org.eclipse.jetty.server.Server.doStart(Server.java:277)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.hudson.jetty.JettyLauncher.start(JettyLauncher.java:152)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.hudson.war.Executable.launchJetty(Executable.java:134)
	at org.eclipse.hudson.war.Executable.main(Executable.java:72)
Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null
---- Debugging information ----
cause-exception     : java.lang.NullPointerException
cause-message       : null
class               : org.eclipse.hudson.security.HudsonSecurityManager
required-type       : org.eclipse.hudson.security.HudsonSecurityManager
converter-type      : hudson.util.RobustReflectionConverter
path                : /hudsonSecurityManager
line number         : 32
version             : null
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1034)
	at hudson.util.XStream2.unmarshal(XStream2.java:76)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1018)
	at hudson.XmlFile.unmarshal(XmlFile.java:136)
	... 21 more
Caused by: java.lang.NullPointerException
	at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:185)
	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:264)
	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:173)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	... 30 more
Re: Hudson 3.0.0 + Active Directory [message #1007158 is a reply to message #1005019] Mon, 04 February 2013 16:04 Go to previous messageGo to next message
Reinhard Nägele is currently offline Reinhard NägeleFriend
Messages: 23
Registered: January 2013
Junior Member
The plugin does not work very reliably. Sometimes it happens that after a restart authentication does not work, i. e. it is not possible to log in at all. A login using the JS popup just reports an authentication failure. A login using an embedded login form redirects to this:

HTTP ERROR 404

Problem accessing /hudsontest/j_spring_security_check. Reason:

Not Found


After another restart things will usually work again. The log is totally silent. I wonder the plugin works at all considering the stacktrace in my previous post and the fact the the log says that hudson.plugins.active_directory.ActiveDirectorySecurityRealm does not exist.


Re: Hudson 3.0.0 + Active Directory [message #1007663 is a reply to message #1007158] Wed, 06 February 2013 22:43 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I think that is the problem. This is the step (but don't know hoe that happened)

- Active directory plugin loaded. You are able to set your authentication, Hudson writes to /exports/home4/hudson/hudson-test/.hudson/hudson-security.xml
- Next time you started Hudson, some how Active directory plugin did not loaded (this is puzzling how that happened). Hudson attempts to resolve hudson.plugins.active_directory.ActiveDirectorySecurityRealm from hudson-security.xml. Fails and throws exception because active directory plugins was not loaded and your authentication failed.
When Hudson fails to load a plugin, it will write a log and any associated exception, did you see any?
- When you started Hudson again, some how Active directory plugin was loaded again and now your authentication works fine



Winston Prakash
Eclipse Hudson team
Re: Hudson 3.0.0 + Active Directory [message #1007707 is a reply to message #1007663] Thu, 07 February 2013 08:34 Go to previous messageGo to next message
Reinhard Nägele is currently offline Reinhard NägeleFriend
Messages: 23
Registered: January 2013
Junior Member
I tried to reproduce the behavior by restarting several times. Authentication now worked after every restart. Thinking over it, I figured that I normally would only do a restart after changing some configuration. So I went into Configure System and hit the "Save" button. After another restart, the problem showed up again. The log reports that the plugin is initialized correctly but at the end of the log there is this warning again, which is always logged on startup, but in the error case a second time just before Hudson is ready.

Last lines of the log when things are ok:

INFO: Started all plugins
Feb 7, 2013 9:22:57 AM hudson.model.Hudson$5 onAttained
INFO: Attained Discovering plugin initialization tasks
Feb 7, 2013 9:22:57 AM hudson.model.Hudson$5 onAttained
INFO: Augmented all extensions
Feb 7, 2013 9:22:57 AM hudson.model.Hudson$5 onAttained
INFO: Attained null
Feb 7, 2013 9:22:57 AM hudson.model.Hudson$5 onAttained
INFO: Attained null
Feb 7, 2013 9:22:58 AM hudson.model.Hudson$5 onAttained
INFO: Attained Loading global config
Feb 7, 2013 9:22:59 AM hudson.model.Hudson$5 onAttained
INFO: Loaded all jobs
Feb 7, 2013 9:22:59 AM hudson.model.Hudson$5 onAttained
INFO: Attained Loading job test job
Feb 7, 2013 9:22:59 AM hudson.model.Hudson$5 onAttained
INFO: Attained null
Feb 7, 2013 9:22:59 AM hudson.model.Hudson$5 onAttained
INFO: Completed initialization
Feb 7, 2013 9:22:59 AM hudson.model.Hudson$5 onAttained
INFO: Attained Finalizing set up
Feb 7, 2013 9:22:59 AM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 19006
Feb 7, 2013 9:23:07 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:23:07 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:23:08 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:23:08 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:23:08 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:23:10 AM org.hudsonci.rest.plugin.RestPlugin enable
INFO: API provider JAX-RS (Jersey) enabled
Feb 7, 2013 9:23:10 AM org.hudsonci.rest.plugin.RestPlugin enable
INFO: API provider Bayeux (CometD) enabled
Feb 7, 2013 9:23:10 AM org.hudsonci.events.ready.ReadyDetector run
INFO: Hudson is ready.


End of log whe Active Directory plugin does not work:

INFO: Started all plugins
Feb 7, 2013 9:13:59 AM hudson.model.Hudson$5 onAttained
INFO: Attained Discovering plugin initialization tasks
Feb 7, 2013 9:13:59 AM hudson.model.Hudson$5 onAttained
INFO: Attained null
Feb 7, 2013 9:13:59 AM hudson.model.Hudson$5 onAttained
INFO: Augmented all extensions
Feb 7, 2013 9:13:59 AM hudson.model.Hudson$5 onAttained
INFO: Attained null
Feb 7, 2013 9:13:59 AM hudson.model.Hudson$5 onAttained
INFO: Attained Loading global config
Feb 7, 2013 9:14:00 AM hudson.model.Hudson$5 onAttained
INFO: Loaded all jobs
Feb 7, 2013 9:14:00 AM hudson.model.Hudson$5 onAttained
INFO: Attained Loading job test job
Feb 7, 2013 9:14:00 AM hudson.model.Hudson$5 onAttained
INFO: Attained null
Feb 7, 2013 9:14:00 AM hudson.model.Hudson$5 onAttained
INFO: Completed initialization
Feb 7, 2013 9:14:00 AM hudson.model.Hudson$5 onAttained
INFO: Attained Finalizing set up
Feb 7, 2013 9:14:00 AM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 1385
Feb 7, 2013 9:14:08 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:14:09 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:14:09 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:14:09 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:14:10 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
Feb 7, 2013 9:14:14 AM hudson.util.RobustReflectionConverter doUnmarshal
WARNING: Skipping a non-existent type hudson.plugins.active_directory.ActiveDirectorySecurityRealm

Feb 7, 2013 9:14:14 AM org.hudsonci.rest.plugin.RestPlugin enable
INFO: API provider JAX-RS (Jersey) enabled
Feb 7, 2013 9:14:14 AM org.hudsonci.rest.plugin.RestPlugin enable
INFO: API provider Bayeux (CometD) enabled
Feb 7, 2013 9:14:14 AM org.hudsonci.events.ready.ReadyDetector run
INFO: Hudson is ready.


Re: Hudson 3.0.0 + Active Directory [message #1007830 is a reply to message #1007707] Thu, 07 February 2013 16:50 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Actually Hudson loads the security settings, before the plugins get loaded. This is for one time initial setup. Since the plugins are no loaded at that time, you can expect the info being logged, but that is harmless.

Note: This is not ideal, because if user setup security via plugin, then it is impossible to do the initial setup, with out manually modifying the hudson-security.xml file and disable the security temporarily.

However, Hudson tries to reload the hudson-security.xml after all the plugins are loaded. Appears there is some kind of race condition between Hudson trying to loading the plugins and Hudson trying to load the security. They are done in a task reactor (threaded), but loading security is need to be the last task.

I have to dive deep in to this make sure the security loading happens after all the plugins are loaded.

Could you file a bug on this at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Hudson


Winston Prakash
Eclipse Hudson team
Re: Hudson 3.0.0 + Active Directory [message #1007909 is a reply to message #1007830] Fri, 08 February 2013 07:09 Go to previous messageGo to next message
Reinhard Nägele is currently offline Reinhard NägeleFriend
Messages: 23
Registered: January 2013
Junior Member
Thanks, Winston, here is the bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=400285

What's strange is that even saving the configuration without changing anything causes the problem.
Re: Hudson 3.0.0 + Active Directory [message #1730653 is a reply to message #1007909] Wed, 27 April 2016 11:02 Go to previous message
Goutham Nithyananda is currently offline Goutham NithyanandaFriend
Messages: 1
Registered: April 2016
Junior Member
Was this bug fixed?
Is there any work around to overcome this situation?
Previous Topic:Hudson Central Authentication Service
Next Topic:When multi modules maven project merge, all modules' Hudson jobs were starting
Goto Forum:
  


Current Time: Thu Mar 28 14:50:18 GMT 2024

Powered by FUDForum. Page generated in 0.23559 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top