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

Updating the plugin broke configuration as code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 647.vdee7766b_cfa_e

      We are running Jenkins as a docker container with image jenkins/jenkins:2.387.1-alpine.

      Updating gitlab branch-source-plugin from 645.v62a_b_6fce8659 to 646.vb_9560d64b_69f broke the jenkins startup with the following error:

      jenkins-master-1  | 2023-03-13 09:53:57.294+0000 [id=24]	SEVERE	hudson.util.BootFailure#publish: Failed to initialize Jenkins
      jenkins-master-1  | io.jenkins.plugins.casc.ConfiguratorException: Invalid configuration elements for type class jenkins.model.GlobalConfigurationCategory$Unclassified : gitLabServers.
      jenkins-master-1  | Available attributes : administrativeMonitorsConfiguration, ansiColorBuildWrapper, artifactManager, artifactoryBuilder, audit-trail, azureCLI, azureKeyVault, bitbucketEndpointConfiguration, buildDiscarders, buildStepOperation, buildTimestamp, buildUser, buildUserVars, builtInNode, casCGlobalConfig, commonConfig, defaultFolderConfiguration, defaultView, dependencyTrackPublisher, email-ext, enrichedSummaryConfig, envInjectNodeProperty, envVarsFilter, fingerprints, gitHubConfiguration, gitHubPluginConfig, gitLabConnectionConfig, globalConfigFiles, globalDefaultFlowDurabilityLevel, globalLibraries, globalTimeOutConfiguration, httpRequestGlobalConfig, injectionConfig, ivyBuildTrigger, ivyModuleSet, jacoco, jiraGlobalConfiguration, junitTestResultStorage, location, lockableResourcesManager, mailer, mavenModuleSet, metricsAccessKey, myView, nodeProperties, pipeline-model-docker, plugin, pollSCM, prePostClean, prismConfiguration, projectNamingStrategy, prometheusConfiguration, quietPeriod, rebuildDescriptor, resourceRoot, scmGit, scmRetryCount, shell, sidebarGlobalLink, simple-theme-plugin, sonarGlobalConfiguration, subversionSCM, throttleJobProperty, timestamper, upstream, usageStatistics, viewsTabBar, warningsParsers, warningsPlugin
      jenkins-master-1  | 	at io.jenkins.plugins.casc.BaseConfigurator.handleUnknown(BaseConfigurator.java:375)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:364)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:286)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:776)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:712)
      jenkins-master-1  | Caused: io.jenkins.plugins.casc.ConfiguratorException: unclassified: error configuring 'unclassified' with class io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator configurator
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:718)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:776)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:761)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:637)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:306)
      jenkins-master-1  | 	at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:298)
      jenkins-master-1  | Caused: java.lang.reflect.InvocationTargetException
      jenkins-master-1  | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      jenkins-master-1  | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      jenkins-master-1  | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      jenkins-master-1  | 	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
      jenkins-master-1  | 	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
      jenkins-master-1  | Caused: java.lang.Error
      jenkins-master-1  | 	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:115)
      jenkins-master-1  | 	at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:185)
      jenkins-master-1  | 	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
      jenkins-master-1  | 	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1164)
      jenkins-master-1  | 	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
      jenkins-master-1  | 	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
      jenkins-master-1  | 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
      jenkins-master-1  | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      jenkins-master-1  | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      jenkins-master-1  | 	at java.base/java.lang.Thread.run(Unknown Source)
      jenkins-master-1  | Caused: org.jvnet.hudson.reactor.ReactorException
      jenkins-master-1  | 	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:290)
      jenkins-master-1  | 	at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
      jenkins-master-1  | 	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1199)
      jenkins-master-1  | 	at jenkins.model.Jenkins.<init>(Jenkins.java:987)
      jenkins-master-1  | 	at hudson.model.Hudson.<init>(Hudson.java:86)
      jenkins-master-1  | 	at hudson.model.Hudson.<init>(Hudson.java:82)
      jenkins-master-1  | 	at hudson.WebAppMain$3.run(WebAppMain.java:247)
      jenkins-master-1  | Caused: hudson.util.HudsonFailedToLoad
      jenkins-master-1  | 	at hudson.WebAppMain$3.run(WebAppMain.java:264)
      jenkins-master-1  | 2023-03-13 09:53:57.305+0000 [id=24]	INFO	hudson.lifecycle.Lifecycle#onStatusUpdate: Stopping Jenkins
      jenkins-master-1  | 2023-03-13 09:53:57.347+0000 [id=24]	INFO	jenkins.model.Jenkins$16#onAttained: Started termination
      jenkins-master-1  | 2023-03-13 09:53:57.369+0000 [id=24]	INFO	h.p.b.global.Lifecycle#shutdown: Shutdown complete - Global TimeOut ScheduledExecutorService had 0 tasks pending
      

      I could resolve the problem by removing the following object in the jenkins.yaml file:

       gitLabServers:
         servers:
         - credentialsId: "Gitlab-zAuroraBuild_GL-access-token"
           manageWebHooks: true
           name: "Haufe Gitlab"
           secretToken: ...
           serverUrl: "https://gitlab.haufedev.systems"
      

        1. configuration-as-code.yaml
          0.3 kB
        2. plugins.txt
          6 kB
        3. run-jenkins.sh
          1.0 kB

            baymac Parichay Barpanda
            ganssauge Gottfried Ganßauge
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: