After upgrading to version 2.401.2.3 managed controller cannot connect to the operations center

1 minute readKnowledge base

Issue

After upgrading to version 2.401.2.3, our managed controller fail to connect to the operations center. We can see a stacktrace like the one shown below:

XX-XX-XX XXXX [id=18]    WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving https://XXXXX/XXX/securityRealm/finishLogin
java.lang.IllegalStateException: Operations Center public key is not available. Try again later.
        at com.cloudbees.opscenter.client.plugin.OperationsCenterSsoSecurityRealm.getIssuerPublicKey(OperationsCenterSsoSecurityRealm.java:85)
        at com.cloudbees.opscenter.security.AbstractSsoSecurityRealm.doFinishLogin(AbstractSsoSecurityRealm.java:260)
        at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
        at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
Caused: java.lang.reflect.InvocationTargetException
        at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:401)
        at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)

Resolution

This issue is caused by a regression included in release 2.401.2.3 (BEE-37051) which caused the managed controller using WebSockets as trasnsport to fail authenticating with the operations center. You can find a reference to this issue in a warning corresponding to the affected release in our Release Notes.

To solve the issue you might want to upgrade your operations center ane the connected managed controller up to version 2.401.2.5 or higher.

Workaround

A temporary workaround to get the managed controller connected back is to disable WebSockets transport in the managed controller item definition that can be found at operations center level.