Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-74834

Jenkins Server does not start anymore after Upgrade from Release 2.462.3 to 2.479.1 due to Issues with the CAS Plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • cas-plugin
    • None

      Environment

      System Debian 12 OS (Bookworm), Patch Level 12.8
      Installation Package Repository pkg.jenkins.io/debian-stable binary/
      Java
      openjdk 17.0.13 2024-10-15
      OpenJDK Runtime Environment (build 17.0.13+11-Debian-2deb12u1)
      OpenJDK 64-Bit Server VM (build 17.0.13+11-Debian-2deb12u1, mixed mode, sharing)
      Previous Jenkins Server Release 2.462.3
      Jenkins CAS Plugin Version 1.6.3

      Steps to Reproduce

      1. apt update (updating package lists)
      2. systemctl stop jenkins
      3. apt install jenkins (update to the latest Jenkins server version from Jenkins installation package repository)
      4. systemctl start jenkins
      5. unexpected result: Jenkins server does not start anymore
      6. apt install jenkins=2.462.3 (downgrade to previous release)
      7. systemctl start jenkins
      8. all good, server starts and Jenkins works

      Supposed Issues

      1. obviously with the CAS plugin

      systemd Journal Log

      1. CAS issues:
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]: 2024-11-11 11:12:12.611+0000 [id=38]        WARNING        o.s.c.s.AbstractApplicationContext#refresh: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casFilter' defined in org.jenkinsci.plugins.cas.spring.CasConfigurationContext: Unsatisfied dependency expressed through method 'casFilter' parameter 2: Error creating bean with name 'casAuthenticationFilter' defined in org.jenkinsci.plugins.cas.spring.CasConfigurationContext: Unsatisfied dependency expressed through method 'casAuthenticationFilter' parameter 0: No qualifying bean of type 'org.springframework.security.authentication.AuthenticationManager' available: expected single matching bean but found 2: casAuthenticationManager,casRestAuthenticator
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]: 2024-11-11 11:12:12.621+0000 [id=38]        SEVERE        jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading global config
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casFilter' defined in org.jenkinsci.plugins.cas.spring.CasConfigurationContext: Unsatisfied dependency expressed through method 'casFilter' parameter 2: Error creating bean with name 'casAuthenticationFilter' defined in org.jenkinsci.plugins.cas.spring.CasConfigurationContext: Unsatisfied dependency expressed through method 'casAuthenticationFilter' parameter 0: No qualifying bean of type 'org.springframework.security.authentication.AuthenticationManager' available: expected single matching bean but found 2: casAuthenticationManager,casRestAuthenticator
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:795)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:542)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:971)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at PluginClassLoader for cas-plugin//org.jenkinsci.plugins.cas.CasSecurityRealm.getApplicationContext(CasSecurityRealm.java:162)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at PluginClassLoader for cas-plugin//org.jenkinsci.plugins.cas.CasSecurityRealm.createFilter(CasSecurityRealm.java:230)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at hudson.security.SecurityRealm.createFilter(SecurityRealm.java:626)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at hudson.security.HudsonFilter.reset(HudsonFilter.java:145)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at jenkins.model.Jenkins.resetFilter(Jenkins.java:2820)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at jenkins.model.Jenkins.load(Jenkins.java:3432)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at jenkins.model.Jenkins$12.run(Jenkins.java:3528)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at jenkins.model.Jenkins$5.runTask(Jenkins.java:1195)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at java.base/java.lang.Thread.run(Thread.java:840)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]: Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casAuthenticationFilter' defined in org.jenkinsci.plugins.cas.spring.CasConfigurationContext: Unsatisfied dependency expressed through method 'casAuthenticationFilter' parameter 0: No qualifying bean of type 'org.springframework.security.authentication.AuthenticationManager' available: expected single matching bean but found 2: casAuthenticationManager,casRestAuthenticator
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:795)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:542)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:782)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         ... 28 more
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]: Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.security.authentication.AuthenticationManager' available: expected single matching bean but found 2: casAuthenticationManager,casRestAuthenticator
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:218)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1420)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:782)
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]:         ... 42 more
        Nov 11 11:12:12 itob-build-jenkins-dev-bap01 jenkins[2748138]: 2024-11-11 11:12:12.624+0000 [id=24]        SEVERE        hudson.util.BootFailure#publish: Failed to initialize Jenkins
      2. full log jenkins-update-error.txt

            Unassigned Unassigned
            juergenc Juergen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: