Move/Copy/Promote failure for versions 2.303.2.3 through 2.303.2.6

Article ID:4408755015451
2 minute readKnowledge base

Issue

When running versions 2.303.2.3 through 2.303.2.6 (inclusive), using Move, Copy, Promote can sometimes fail with the error in the UI:

Move/Copy/Promote
Done
FAILURE

If you check the logs of the controller you will see the error:

Oct 20, 2021 6:28:54 PM SEVERE com.cloudbees.opscenter.replication.stages.NoExistingValidation apply
The post-flight validation failed
com.thoughtworks.xstream.security.ForbiddenClassException: org.jenkinsci.plugins.workflow.job.WorkflowJob
	at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
	at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
	at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:377)
	at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:45)
	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:133)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1391)
	at hudson.util.XStream2.unmarshal(XStream2.java:160)
	at hudson.util.XStream2.unmarshal(XStream2.java:131)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1376)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1270)
	at hudson.XmlFile.read(XmlFile.java:149)
Caused: java.io.IOException: Unable to read /tmp/validation35dca20d-a9bd-4822-9602-0710cfba3daf/config.xml
	at hudson.XmlFile.read(XmlFile.java:151)
	at com.cloudbees.opscenter.replication.stages.NoExistingValidation$ValidationCallable.call(NoExistingValidation.java:175)
	at com.cloudbees.opscenter.replication.stages.NoExistingValidation$ValidationCallable.call(NoExistingValidation.java:113)
	at com.cloudbees.opscenter.context.remote.RemoteAuthentication.impersonate(RemoteAuthentication.java:100)
	at com.cloudbees.opscenter.context.rpc.RPCRequest$1.call(RPCRequest.java:216)
	at hudson.remoting.LocalChannel.lambda$callAsync$0(LocalChannel.java:53)
	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused: java.util.concurrent.ExecutionException
	at com.cloudbees.opscenter.context.rpc.RPCFuture.get(RPCFuture.java:291)
	at com.cloudbees.opscenter.replication.stages.NoExistingValidation.apply(NoExistingValidation.java:92)
	at com.cloudbees.opscenter.replication.ItemReplicationTask.runStages(ItemReplicationTask.java:559)
	at com.cloudbees.opscenter.replication.ItemReplicationTask._perform(ItemReplicationTask.java:497)
	at com.cloudbees.opscenter.replication.ItemReplicationRecord.perform(ItemReplicationRecord.java:193)
	at com.cloudbees.opscenter.replication.ItemReplicationRecord.run(ItemReplicationRecord.java:167)
	at hudson.model.ResourceController.execute(ResourceController.java:99)
	at hudson.model.Executor.run(Executor.java:431)

Note the class name after the ForbiddenClassException can vary, depending on the type of item being moved.

For example if moving a freestyle job, the exception would be: com.thoughtworks.xstream.security.ForbiddenClassException: hudson.model.FreeStyleProject

Resolution

This issue is fixed in release 2.303.3.3, you will see it listed in the release notes as Move/Copy/Promote error (BEE-9464).

Workaround

The error can be worked around by restarting the destination controller (for example by going to JENKINS_URL/restart or using the operations center) and then running the Move/Copy/Promote operation again.

Tested product/plugin versions

CloudBees CI on Modern Cloud platforms 2.303.2.3

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.