Setting up a custom update center

Article ID:212614648
2 minute readKnowledge base

Issue

  • Client controllers connected to an Operations Center do not connect to the Update Site URL provided by the Update Center configured in the Operations Center.

  • Even if you try to modify the Update Center URL configuration on Client controllers, it will not work properly and then it will show this error log:

    2015-10-22 08:36:08.838+0000 [id=166]   SEVERE  hudson.model.UpdateSite#updateData:
    ERROR: Signature verification failed in update site 'MY-CUSTOM-UC'(show details)
    java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
    at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:208)
    at java.security.cert.CertPathValidator.validate(CertPathValidator.java:279)
    at org.jvnet.hudson.crypto.CertificateUtil.validatePath(CertificateUtil.java:93)
    at jenkins.util.JSONSignatureValidator.verifySignature(JSONSignatureValidator.java:76)
    at hudson.model.UpdateSite.verifySignature(UpdateSite.java:227)
    at hudson.model.UpdateSite.updateData(UpdateSite.java:206)
    at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:178)
    at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:890)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  • I want to set a previously created custom Update Center for a given controller using Groovy.

  • I want to set a custom Update Center for a given controller to the custom Update Center that I have set up on my CJOC.

Environment

  • CloudBees Operations Center

  • Operations Center Update Center Plugin

Resolution

Check that on Client controller side you configured the Update Center correctly.

After creating the Update Center as is defined in our Creating an Update Center article, you have to specify the Update Center for the Client controller.

Resolution using Jenkins UI

This can be achieved by going to the said controller > Configure > Specify update center for controller and selecting the correct Update Center as can be seen in the image below:

specify update center for controller
You may need to wait some seconds after doing the setup to test your linked Update Center.

Resolution using Groovy

You may want to perform the operation above using a Groovy script instead of the UI. In this case, you can go to your Operations Center > Manage Jenkins > Script Console and run the following code replacing CONTROLLER_NAME with the name of the desired controller and CUSTOM_UC_NAME with the name of the desired custom Update Center:

def controller = Jenkins.instance.getItemByFullName("CONTROLLER_NAME")

master.getProperties().remove(com.cloudbees.opscenter.plugins.updatecenter.ConnectedMasterUpdateCenterProperty.class)

master.getProperties().add(new com.cloudbees.opscenter.plugins.updatecenter.ConnectedMasterUpdateCenterProperty(
  new com.cloudbees.plugins.updatecenter.sources.LocalUpdateSource("CUSTOM_UC_NAME")))

master.save()