The Agent log shows these messages every 2-3 minutes:
U02000383 Web Socket connection closed with status code '1006 ()'.
Followed by the reconnection sequence:
20260714/115620.743 - U02000196 Next attempt to create a CP connection in '10' seconds.
20260714/115630.744 - U02000379 Initiating connection to server '<jcp-ws>/<unresolved>:443' using WebSocket URI: 'wss://<jcp-ws>:<port>/agent'.
20260714/115630.989 - U02000438 Number of trusted certificates loaded from '/etc/ssl/ca-bundle.pem': '146'.
20260714/115630.990 - U02000484 This agent trusts '197' certificates when creating a JCP connection.
20260714/115631.174 - U02000004 Connection to Server 'AUTOMIC#CP001' successfully created.
20260714/115631.174 - U02000075 CP Server 'AUTOMIC#CP001' has '1' client connections.
<...>
The JCP has these messages:
20260708/000448.483 - 34 U00045545 Web Socket error: 'ClosedChannel'
20260708/000448.483 - 34 U00003407 Client connection 'CP001#00018326' from '###.###.###.###:#####' has logged off from the Server.
20260708/000448.489 - 34 U00003397 Agent '<Agent_name>' logged off (client connection='CP001#00018326').
The message above means that neither JCP nor Agent know why the connection was interrupted, so it must be a network component that interrupts the connection.
This can be the routing service in a Kubernetes cluster or possible another router or load balancer (F5 etc.)...
A possible fix is to set UC_HOSTCHAR_* > WEBSOCKET_TIMEOUT to a lower value, for instance 60 seconds.
Or increase the idle timeouts on the relevant network components.