NullPointerException when provisionning a Managed Master

Issue

Provisionning a Manager Master in CloudBees Jenkins Enterprise fails with an exception like

java.lang.NullPointerException 
    at com.cloudbees.jce.masterprovisioning.ContainerMasterProvisioning.getDockerImage(ContainerMasterProvisioning.java:205) 
    at com.cloudbees.jce.masterprovisioning.ContainerMasterResource.<init>(ContainerMasterResource.java:49) 
    at com.cloudbees.jce.masterprovisioning.mesos.MesosMasterResource.<init>(MesosMasterResource.java:67) 
    at com.cloudbees.jce.masterprovisioning.mesos.MesosMasterProvisioning$DescriptorImpl.provision(MesosMasterProvisioning.java:418) 
    at com.cloudbees.opscenter.server.provisioning.MasterProvisioning.provision(MasterProvisioning.java:58) 
    at com.cloudbees.opscenter.server.model.ManagedMaster._provisionAction(ManagedMaster.java:1613) 
    at com.cloudbees.opscenter.server.model.ManagedMaster._provisionAndStartAction(ManagedMaster.java:1625) 
    at com.cloudbees.opscenter.server.model.ManagedMaster.provisionAndStartAction(ManagedMaster.java:1420) 
    at com.cloudbees.opscenter.server.model.ManagedMaster.doProvisionAndStartAction(ManagedMaster.java:1788) 

and/or you cannot configure your managed master, the configuration screen fails with

A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened.

Stack trace
java.lang.NullPointerException
	at com.cloudbees.jce.masterprovisioning.ContainerMasterProvisioningDescriptor.doFillImageItems(ContainerMasterProvisioningDescriptor.java:239)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)

Environment

Resolution

To confirm the issue you are facing execute this script on your CJE-OC Script Console ( Manage Jenkins -> Script Console)

ExtensionList.lookup(com.cloudbees.jce.masterprovisioning.DockerImageDefinitionConfiguration.class).get(com.cloudbees.jce.masterprovisioning.DockerImageDefinitionConfiguration.class);

If the script returns nothing you are facing the issue known as TIGER-3950.

There is currently no fix available for TIGER-3950. It will be fixed in the next version of the Master Provisioning Core plugin

Workaround: Restart your CJE-OC (A simple restart from CJE-OC_URL/restart).

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.