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

Github Plugin configuration does not load after service restart

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor

      Whenever I restart the jenkins.service, the configuration for the github plugin fails to reload. the following exception is visible on the journal logs:

      2023-07-27 11:44:32.039+0000 [id=35]        WARNING        hudson.model.Descriptor#load: Failed to load /mnt/data/github-plugin-configuration.xml
      com.thoughtworks.xstream.mapper.CannotResolveClassException: github-plugin-configuration
              at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:81)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
              at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
              at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
              at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
              at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
              at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
              at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:452)
              at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:46)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
              at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
              at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:135)
              at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1464)
              at hudson.util.XStream2.unmarshal(XStream2.java:230)
              at hudson.util.XStream2.unmarshal(XStream2.java:201)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1441)
              at hudson.XmlFile.unmarshal(XmlFile.java:196)
      Caused: java.io.IOException: Unable to read /mnt/data/github-plugin-configuration.xml
              at hudson.XmlFile.unmarshal(XmlFile.java:199)
              at hudson.XmlFile.unmarshal(XmlFile.java:179)
              at hudson.model.Descriptor.load(Descriptor.java:933)
              at org.jenkinsci.plugins.github.config.GitHubPluginConfig.<init>(GitHubPluginConfig.java:86)
              at org.jenkinsci.plugins.github.config.GitHubPluginConfig$$FastClassByGuice$$374e4fd6.GUICE$TRAMPOLINE(<generated>)
              at org.jenkinsci.plugins.github.config.GitHubPluginConfig$$FastClassByGuice$$374e4fd6.apply(<generated>)
              at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
              at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
              at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:33)
              at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:98)
              at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
              at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:610)
              at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:117)
              at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:66)
              at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:93)
              at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
              at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
              at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:445)
              at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
              at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1148)
              at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:403)
              at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:394)
              at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:359)
              at hudson.ExtensionList.load(ExtensionList.java:384)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
              at hudson.ExtensionList.getComponents(ExtensionList.java:184)
              at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:213)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
              at hudson.ExtensionList.iterator(ExtensionList.java:172)
              at hudson.ExtensionList.get(ExtensionList.java:149)
              at jenkins.plugins.shiningpanda.tools.PythonInstallation.list(PythonInstallation.java:128)
              at jenkins.plugins.shiningpanda.tools.PythonInstallation.isEmpty(PythonInstallation.java:119)
              at jenkins.plugins.shiningpanda.ShiningPanda.postInitialize(ShiningPanda.java:51)
              at hudson.PluginManager$2$1$2.run(PluginManager.java:583)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
              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(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)

      We are mounting an external EBS volume on AWS containing our jenkins data to /mnt/data. I've checked file permissions are correct and the jenkins user can most definitely read/write to this location. Because the configuration does not re-load, after each restart I need to go to Dashboard > Manage Jenkins > System and input my Github server configuration (see image).

      I've tried removing the file and re-configuring the plugin. After this /mnt/data/github-plugin-configuration.xml gets regenerated as expected. However when I restart it still fails to load.

      I recall seeing this issue pop up with an older version of this plugin, but I cannot find the link. Any help solving this is appreciated!

            Unassigned Unassigned
            paultoliver Paul
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: