Issue
After upgrading GitHub Plugin to 1.36, global GitHub settings are not loaded upon restart.
When you check under Manage Jenkins
→ Configure System
→ GitHub
→ GitHub Servers
you will notice they are blank.
You will also see the following stack trace during the startup of your controller:
2022-12-29 16:37:55.381+0000 [id=28] WARNING hudson.model.Descriptor#load: Failed to load /var/jenkins_home/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.XStream.unmarshal(XStream.java:1399) at hudson.XmlFile.unmarshal(XmlFile.java:196) Caused: java.io.IOException: Unable to read /var/jenkins_home/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:931) at org.jenkinsci.plugins.github.config.GitHubPluginConfig.<init>(GitHubPluginConfig.java:86) at org.jenkinsci.plugins.github.config.GitHubPluginConfig$$FastClassByGuice$$1509467706.GUICE$TRAMPOLINE(<generated>) at org.jenkinsci.plugins.github.config.GitHubPluginConfig$$FastClassByGuice$$1509467706.apply(<generated>) ... at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.cloudbees.jenkins.support.SupportPlugin.getComponents(SupportPlugin.java:291) at com.cloudbees.jenkins.support.SupportPlugin.postInitialize(SupportPlugin.java:654) at hudson.PluginManager$2$1$2.run(PluginManager.java:576) ...
Resolution
Upgrade the Support Core plugin to version 1241.v32a_39d7032e5 or newer to resolve the issue.
This version of the Support Core plugin is included in release 2.375.3.3 or newer.
The settings are not lost, but they are failing to load during startup. After upgrading the Support Core plugin and restarting, your exisitng GitHub Server configurations will show up again (unless you have modified them when the issue was occurring).
Workaround
After your controller restarts, go to Manage Jenkins
→ Configure System
→ GitHub
→ GitHub Servers
and fill in the details again.
There have been other reports of similar symptomatic behavior of the GitHub plugin settings not loading on startup; the problematic plugin is not always the Support Core plugin. For example, see JENKINS-71786. |