jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.7k stars 722 forks source link

Error when starting jenkins on docker container using jasc #1976

Open AkroutiHamza opened 2 years ago

AkroutiHamza commented 2 years ago

Jenkins and plugins versions report

stack trace ```text java.lang.IllegalArgumentException: No jenkins.security.QueueItemAuthenticator implementation found for global at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:211) at io.vavr.control.Option.orElse(Option.java:321) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:210) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84) at io.vavr.Tuple2.apply(Tuple2.java:238) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55) at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:343) at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:286) at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:350) at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:286) at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:776) at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:712) at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:776) at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:761) at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:637) at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:306) at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:298) Caused: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104) Caused: java.lang.Error at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused: org.jvnet.hudson.reactor.ReactorException at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282) at jenkins.InitReactorRunner.run(InitReactorRunner.java:49) at jenkins.model.Jenkins.executeReactor(Jenkins.java:1162) at jenkins.model.Jenkins.(Jenkins.java:960) at hudson.model.Hudson.(Hudson.java:86) at hudson.model.Hudson.(Hudson.java:82) at hudson.WebAppMain$3.run(WebAppMain.java:295) Caused: hudson.util.HudsonFailedToLoad at hudson.WebAppMain$3.run(WebAppMain.java:312) ```

What Operating System are you using (both controller, and any agents involved in the problem)?

jenkins/jenkins:2.289.3

Reproduction steps

docker run --name jenkins --rm -p 8080:8080 --env JENKINS_ADMIN_ID=test --env JENKINS_ADMIN_PASSWORD=test02 jenkins:2.289.3

Expected Results

jenkins up and cacs loaded successfuly

Actual Results

Console Logs

2022-05-30 08:35:57.313+0000 [id=37]    WARNING h.ExtensionFinder$GuiceFinder$SezpozModule#configure: Failed to load hudson.security.LDAPSecurityRealm$DescriptorImpl
java.lang.ClassNotFoundException: org.springframework.security.ldap.userdetails.LdapUserDetails
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/springframework/security/ldap/userdetails/LdapUserDetails
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.getDeclaredMethods(Class.java:1975)
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:494)
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:480)
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:523)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        at com.google.inject.Guice.createInjector(Guice.java:96)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:283)
        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 java.lang.Class.newInstance(Class.java:442)
        at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
        at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:701)
        at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.getComponents(ExtensionList.java:182)
        at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1159)
        at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2022-05-30 08:35:59.508+0000 [id=37]    INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2022-05-30 08:35:59.516+0000 [id=32]    INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
2022-05-30 08:36:00.749+0000 [id=41]    INFO    h.p.c.CopyArtifactConfiguration#load: CopyArtifact is set to Production mode.
2022-05-30 08:36:00.816+0000 [id=41]    WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy$DescriptorImpl, annotation=[none]]; skipping this component
java.lang.ClassNotFoundException: org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/springframework/security/ldap/userdetails/LdapAuthoritiesPopulator
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at hudson.model.Descriptor.<init>(Descriptor.java:295)
        at jenkins.security.plugins.ldap.LDAPGroupMembershipStrategyDescriptor.<init>(LDAPGroupMembershipStrategyDescriptor.java:32)
        at jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy$DescriptorImpl.<init>(FromGroupSearchLDAPGroupMembershipStrategy.java:91)
        at jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy$DescriptorImpl$$FastClassByGuice$$5ae48b0c.newInstance(<generated>)
        at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
        at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
        at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
        at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:564)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
        at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
Caused: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/springframework/security/ldap/userdetails/LdapAuthoritiesPopulator
  at jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy$DescriptorImpl.<init>(FromGroupSearchLDAPGroupMembershipStrategy.java:91)

1 error
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
        at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:438)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
        at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
        at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
        at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:400)
        at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:391)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.iterator(ExtensionList.java:171)
        at jenkins.model.Jenkins.getDescriptor(Jenkins.java:1581)
        at hudson.plugins.disk_usage.DiskUsageProperty.transitionAuth(DiskUsageProperty.java:444)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
        at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2022-05-30 08:36:00.821+0000 [id=41]    WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=jenkins.security.plugins.ldap.FromUserRecordLDAPGroupMembershipStrategy$DescriptorImpl, annotation=[none]]; skipping this component
java.lang.ClassNotFoundException: org.springframework.ldap.core.DirContextOperations
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/springframework/ldap/core/DirContextOperations
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at hudson.model.Descriptor.<init>(Descriptor.java:295)
        at jenkins.security.plugins.ldap.LDAPGroupMembershipStrategyDescriptor.<init>(LDAPGroupMembershipStrategyDescriptor.java:32)
        at jenkins.security.plugins.ldap.FromUserRecordLDAPGroupMembershipStrategy$DescriptorImpl.<init>(FromUserRecordLDAPGroupMembershipStrategy.java:143)
        at jenkins.security.plugins.ldap.FromUserRecordLDAPGroupMembershipStrategy$DescriptorImpl$$FastClassByGuice$$ae335d3b.newInstance(<generated>)
        at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
        at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
        at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
        at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:564)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
        at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
Caused: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/springframework/ldap/core/DirContextOperations
  at jenkins.security.plugins.ldap.FromUserRecordLDAPGroupMembershipStrategy$DescriptorImpl.<init>(FromUserRecordLDAPGroupMembershipStrategy.java:143)

1 error
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
        at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:438)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
        at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
        at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
        at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:400)
        at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:391)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.iterator(ExtensionList.java:171)
        at jenkins.model.Jenkins.getDescriptor(Jenkins.java:1581)
        at hudson.plugins.disk_usage.DiskUsageProperty.transitionAuth(DiskUsageProperty.java:444)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
        at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2022-05-30 08:36:00.823+0000 [id=41]    WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=jenkins.security.plugins.ldap.LDAPConfiguration$LDAPConfigurationDescriptor, annotation=[none]]; skipping this component
java.lang.ClassNotFoundException: org.springframework.security.ldap.DefaultSpringSecurityContextSource
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/springframework/security/ldap/DefaultSpringSecurityContextSource
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at hudson.model.Descriptor.<init>(Descriptor.java:295)
        at jenkins.security.plugins.ldap.LDAPConfiguration$LDAPConfigurationDescriptor.<init>(LDAPConfiguration.java:388)
        at jenkins.security.plugins.ldap.LDAPConfiguration$LDAPConfigurationDescriptor$$FastClassByGuice$$e6c56406.newInstance(<generated>)
        at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
        at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
        at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
        at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:564)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
        at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
Caused: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/springframework/security/ldap/DefaultSpringSecurityContextSource
  at jenkins.security.plugins.ldap.LDAPConfiguration$LDAPConfigurationDescriptor.<init>(LDAPConfiguration.java:388)

1 error
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
        at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:438)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
        at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
        at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
        at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:400)
        at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:391)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.iterator(ExtensionList.java:171)
        at jenkins.model.Jenkins.getDescriptor(Jenkins.java:1581)
        at hudson.plugins.disk_usage.DiskUsageProperty.transitionAuth(DiskUsageProperty.java:444)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
        at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2022-05-30 08:36:01.132+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2022-05-30 08:36:01.139+0000 [id=41]    WARNING o.j.r.u.AnonymousClassWarnings#warn: Attempt to (de-)serialize anonymous class hudson.plugins.disk_usage.DiskUsageProjectActionFactory$DescriptorImpl$1 in file:/var/jenkins_home/plugins/disk-usage/WEB-INF/lib/disk-usage.jar; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
2022-05-30 08:36:01.172+0000 [id=33]    INFO    jenkins.InitReactorRunner$1#onAttained: System config loaded
2022-05-30 08:36:01.715+0000 [id=33]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
java.lang.IllegalArgumentException: No jenkins.security.QueueItemAuthenticator implementation found for global
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:211)
        at io.vavr.control.Option.orElse(Option.java:321)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:210)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
        at io.vavr.Tuple2.apply(Tuple2.java:238)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
        at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:343)
        at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:286)
        at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:350)
        at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:286)
        at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:776)
        at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:712)
        at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:776)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:761)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:637)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:306)
        at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:298)
Caused: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
        at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2022-05-30 08:36:01.717+0000 [id=22]    SEVERE  hudson.util.BootFailure#publish: Failed to initialize Jenkins
java.lang.IllegalArgumentException: No jenkins.security.QueueItemAuthenticator implementation found for global
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:211)
        at io.vavr.control.Option.orElse(Option.java:321)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:210)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
        at io.vavr.Tuple2.apply(Tuple2.java:238)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
        at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
        at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:343)
        at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:286)
        at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:350)
        at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:286)
        at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:776)
        at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:712)
        at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:776)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:761)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:637)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:306)
        at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:298)
Caused: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
        at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
        at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
        at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
        at jenkins.model.Jenkins.executeReactor(Jenkins.java:1162)
        at jenkins.model.Jenkins.<init>(Jenkins.java:960)
        at hudson.model.Hudson.<init>(Hudson.java:86)
        at hudson.model.Hudson.<init>(Hudson.java:82)
        at hudson.WebAppMain$3.run(WebAppMain.java:295)
Caused: hudson.util.HudsonFailedToLoad
        at hudson.WebAppMain$3.run(WebAppMain.java:312)
2022-05-30 08:36:01.723+0000 [id=22]    INFO    jenkins.model.Jenkins#cleanUp: Stopping Jenkins
2022-05-30 08:36:01.747+0000 [id=22]    INFO    jenkins.model.Jenkins$16#onAttained: Started termination
2022-05-30 08:36:01.765+0000 [id=22]    INFO    jenkins.model.Jenkins$16#onAttained: Completed termination
2022-05-30 08:36:01.765+0000 [id=22]    INFO    jenkins.model.Jenkins#_cleanUpDisconnectComputers: Starting node disconnection
2022-05-30 08:36:01.768+0000 [id=22]    INFO    jenkins.model.Jenkins#_cleanUpShutdownPluginManager: Stopping plugin manager
2022-05-30 08:36:01.788+0000 [id=22]    INFO    jenkins.model.Jenkins#_cleanUpPersistQueue: Persisting build queue
2022-05-30 08:36:01.803+0000 [id=22]    INFO    jenkins.model.Jenkins#_cleanUpAwaitDisconnects: Waiting for node disconnection completion
2022-05-30 08:36:01.892+0000 [id=22]    INFO    jenkins.model.Jenkins#cleanUp: Jenkins stopped

Anything else?

No response

jetersen commented 2 years ago

Seems like a issue with the LDAP plugin and not JCasC.

AkroutiHamza commented 2 years ago

below my jasc

jenkins:
  securityRealm:
    local:
      allowsSignup: false
      users:
       - id: ${JENKINS_ADMIN_ID}
         password: ${JENKINS_ADMIN_PASSWORD}
  authorizationStrategy:
    globalMatrix:
      permissions:
        - "Overall/Administer:admin"
        - "Overall/Read:authenticated"
  remotingSecurity:
    enabled: true
security:
  queueItemAuthenticator:
    authenticators:
    - global:
        strategy: triggeringUsersAuthorizationStrategy
unclassified:
  location:
    url: http://127.0.0.1:8080/
AkroutiHamza commented 2 years ago

@jetersen i have upgraded my jenkins version from 2.235.1 to 2.289.3 on docker runnnig on docker container using jasc but i didn't upgrade my plugins me too i think that the problem in the ldap plugin but i can't upgrade the plugin because i faced this issue when starting jenkins

jetersen commented 2 years ago

@AkroutiHamza I suggest you read here: https://github.com/jenkinsci/docker#preinstalling-plugins

jetersen commented 2 years ago

You should be able to use plugin installation manager tool inside docker container to both list installed plugins and find available updates

https://github.com/jenkinsci/plugin-installation-manager-tool FYI the tool is already available in the docker container as: jenkins-plugin-cli executable

timja commented 2 years ago

error looks like you have an old ldap plugin