Issue
A client controller is unable to connect to operations center. The client controller remains offline in the operations center controller list and repeatedly attempts to reconnect.
operations-center-connector.log on the client controller shows:
Error trying to establish connection to wss://<host>/cloudbees-core-oc/ws{CTRL}s/
io.jenkins.remoting.shaded.org.glassfish.tyrus.core.HandshakeException: Response code was not 101: 403.
org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: The remote Jenkins https://<host>/cloudbees-core-oc/ is not reporting an 'idName' connection header. Operations Center is required to always provide an 'idName' connection header. Is the URL correct?
jenkins.log on operations center shows the connection being refused because the registered controller name does not match:
WARNING c.c.o.s.m.OperationsCenter$ClientListenerImpl#onHeadersReceived: Refusing WebSocket connection from /<ip>:0 on .../cloudbees-core-cm/ as there is no controller with 'idName':'0-ExampleController' org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: The Controller 0-ExampleController does not exist
If the idName values are correct but the connection still fails with HTTP 400 instead of 101 Switching Protocols, investigate whether the WebSocket upgrade request is being rejected or modified. Possible causes include an incorrect endpoint or a network intermediary (such as a proxy, load balancer, or CDN/WAF). An HTTP 400 response alone does not establish that a network intermediary is responsible.
Resolution
-
On the client controller, navigate to and note the configured
idName. -
On operations center, confirm the exact controller name under which the client controller is registered.
-
Compare the two values character-for-character, paying close attention to prefixes or suffixes (for example, a leading
0-). -
Update the client controller’s
idNameto match the name registered in operations center exactly. IfidNameis managed through Configuration as Code (CasC) or an environment variable, update that source as well so the fix persists across redeployments. -
Save the configuration and confirm the client controller reconnects and shows
CONNECTABLEin the connector log. -
If the
idNamevalues match but the handshake still fails with HTTP 400, verify the configured endpoint and review any NAT, load balancer, proxy, or CDN/WAF in the path. Confirm that the intermediary supports WebSocket connections and correctly handles theUpgradeandConnectionheaders.
Workaround
No workaround is available; the idName must be corrected to match on both sides, and any network intermediary altering the WebSocket upgrade must be reconfigured to pass the handshake through unmodified.