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

JCasC redeploy randomly fails with :Invalid configuration elements for type class jenkins.model.GlobalConfigurationCategory$Security : queueItemAuthenticator.

XMLWordPrintable

      Sometimes when doing jenkins redeploy via ansible and JCasC I'm getting this error and broken page:

       

      io.jenkins.plugins.casc.ConfiguratorException: Invalid configuration elements for type class jenkins.model.GlobalConfigurationCategory$Security : queueItemAuthenticator.
      Available attributes : apiToken, apiTokenProperty, copyartifact, crumb, gitHooks, gitHostKeyVerificationConfiguration, globalJobDslSecurityConfiguration, sSHD, scriptApproval, updateSiteWarningsConfiguration
          at io.jenkins.plugins.casc.BaseConfigurator.handleUnknown(BaseConfigurator.java:375)
          at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:364)
          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)
      Caused: io.jenkins.plugins.casc.ConfiguratorException: security: error configuring 'security' with class io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator configurator
          at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:718)
          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 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.base/java.lang.reflect.Method.invoke(Unknown Source)
          at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
      Caused: java.lang.Error
          at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:115)
          at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:185)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
          at jenkins.model.Jenkins$5.runTask(Jenkins.java:1164)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
          at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.base/java.lang.Thread.run(Unknown Source)
      Caused: org.jvnet.hudson.reactor.ReactorException
          at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:290)
          at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
          at jenkins.model.Jenkins.executeReactor(Jenkins.java:1199)
          at jenkins.model.Jenkins.<init>(Jenkins.java:987)
          at hudson.model.Hudson.<init>(Hudson.java:86)
          at hudson.model.Hudson.<init>(Hudson.java:82)
          at hudson.WebAppMain$3.run(WebAppMain.java:247)
      Caused: hudson.util.HudsonFailedToLoad
          at hudson.WebAppMain$3.run(WebAppMain.java:264) 

      my casc files looks just like:

       57 security:
       58   globaljobdslsecurityconfiguration:
       59     useScriptSecurity: true
       60   queueItemAuthenticator:
       61     authenticators:
       62     - global:
       63         strategy: triggeringUsersAuthorizationStrategy            

      I'm using jenkins 2.387.2 and version of this authorize plugin 1.5.1.

       

      I was getting this error for a long time with previous versions too.

      I will appreciate any help!

        1. run-jenkins.sh
          0.9 kB
        2. plugins.txt
          0.5 kB
        3. jenkins.yaml
          0.3 kB
        4. security.yaml
          0.2 kB
        5. unclassified.yaml
          0.1 kB
        6. log_queueItemAuthenticator.zip
          160 kB

            Unassigned Unassigned
            roboo R K
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: