GitHub Plugin settings not loaded on operations center startup after upgrading

1 minute readKnowledge base

Issue

After upgrading GitHub Plugin to 1.36, global GitHub settings are not loaded upon restart.

When you check under Manage JenkinsConfigure SystemGitHubGitHub Servers you will notice they are blank. You will also see the following stack trace during the startup of your operations center:

WARNING	hudson.model.Descriptor#load: Failed to load /tmp/joc-1-home/github-plugin-configuration.xml
com.thoughtworks.xstream.mapper.CannotResolveClassException: github-plugin-configuration
	...
Caused: java.io.IOException: Unable to read /tmp/joc-1-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:933)
	at org.jenkinsci.plugins.github.config.GitHubPluginConfig.<init>(GitHubPluginConfig.java:86)
	at org.jenkinsci.plugins.github.config.GitHubPluginConfig$$FastClassByGuice$$1415135912.GUICE$TRAMPOLINE(<generated>)
	at org.jenkinsci.plugins.github.config.GitHubPluginConfig$$FastClassByGuice$$1415135912.apply(<generated>)
	...
	at jenkins.model.Jenkins.getRootUrl(Jenkins.java:2461)
	at com.cloudbees.opscenter.agent.OperationsCenterProtocolImpl.getInstanceIdentityCertificate(OperationsCenterProtocolImpl.java:516)
	at com.cloudbees.opscenter.server.model.OperationsCenter.configureAgentListener(OperationsCenter.java:1109)
	at com.cloudbees.opscenter.server.model.OperationsCenter.postInitialize(OperationsCenter.java:1121)
	at hudson.PluginManager$2$1$2.run(PluginManager.java:583)
    ...

Context

There have been other reports of similar symptomatic behavior of the GitHub plugin settings not loading on startup. In this case, the problematic plugin is the Operations Server plugin.

On controllers, other problematic plugins have been identified. See for example: - JENKINS-71786 (shiningpanda) - GitHub Plugin settings not loaded on startup after upgrading (support-core)

Workarounds

Any of the following can help workaround the problem:

  • After your controller restarts, go to Manage JenkinsConfigure SystemGitHubGitHub Servers and fill in the details again.

  • Use CasC for the operations center to set the GitHub plugin configuration.

  • Use a post init Groovy script to configure the GitHub plugin.

Tested product/plugin versions

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.