Agent disconnects and does not reconnect: U00045419 Duplicate Agent
search cancel

Agent disconnects and does not reconnect: U00045419 Duplicate Agent

book

Article ID: 380658

calendar_today

Updated On:

Products

Automic SaaS CA Automic One Automation CA Automic Workload Automation - Automation Engine

Issue/Introduction

An agent that is connected to the system disconnects regularly with the following message:

20240925/000804.012 - U02000385 Web socket error: 'Connection reset'.
20240925/000804.014 - U00045014 Exception 'java.net.SocketException: "Connection reset"' at 'sun.nio.ch.SocketChannelImpl.throwConnectionReset():394'.
20240925/000804.024 - U02000196 Next attempt to create a CP connection in '10' seconds.
20240925/000814.026 - U02000379 Initiating connection to server 'jcp_server.example.com/<unresolved>:443' using WebSocket URI: 'wss://jcp_server.example.com:443/agent'.
...
20240925/000914.700 - U00003366 Connection to agent 'RA_AGENT' already exists (old connection 'CP001#00000155', new connection 'CP001#00000165').
20240925/000914.700 - U02000041 Shutdown Agent 'RA_AGENT'.

The JCP logs shows:

20240925/070814.598 - 36     U00003406 Client connection 'CP001#00000165'  from '10.0.0.1' has logged on to the Server.
20240925/070814.674 - 40     U00045419 Duplicate Agent 'RA_AGENT' , old ID 'CP001#00000155', new ID 'CP001#00000165'. Processing of messages from this agent is suspended.
20240925/070814.675 - 40     U00045420 Pinging agent 'RA_AGENT' on 'CP001#00000155' to test the connection.\
20240925/070814.675 - 40     U00045418 Duplicate Agent: Delay processing of 'INITCHAL' from 'CP001#00000165'.
20240925/070914.676 - 55     U00045423 Duplicate Agent: Timeout expired for agent 'RA_AGENT'.
20240925/070914.676 - 55     U00045426 Duplicate agent 'RA_AGENT' ('CP001#00000165'). Agent will be terminated or disconnected.
20240925/070914.680 - 55     U00003366 Connection to agent 'RA_AGENT' already exists (old connection 'CP001#00000155', new connection 'CP001#00000165').
20240925/070919.261 - 38     U00003407 Client connection 'CP001#00000165' from '10.0.0.1:38906' has logged off from the Server.
20240925/071040.600 - 39     U00003407 Client connection 'CP001#00000155' from '10.0.0.1:56796' has logged off from the Server.
20240925/071040.605 - 39     U00003397 Agent 'RA_AGENT' logged off (client connection='CP001#00000155').

In this case the onboarding of the new agent is delayed and the JCP sends a ping message to the old connection.

There is no reply to ping on the old session but also no I/O error. The timeout expired. 

Environment

Automation Engine 21.x and 24.x

Cause

The issue has been confirmed to be a bug by our Dev team.

Resolution

Workaround:

In the UC_HOSTCHAR_DEFAULT variable in client 0 (or whichever UC_HOSTCHAR_ variable the agent uses), set the following settings:

  • WEBSOCKET_TIMEOUT to 60 instead of 600
  • KEEP_ALIVE to 60 instead of 600

This change will allow JCP to more quickly detect if an agent loses connection, enabling faster reconnection attempts.

If there are any firewall configurations in your infrastructure that terminate connections due to inactivity, this adjustment will help by ensuring that a ping/pong exchange occurs every 40 seconds to keep the connection alive.

Solution:

Update to a fix version listed below or a newer version if available.

Fix version:
Component(s): Automation Engine
Will be fixed in Automation.Engine 21.0.13 - Planned release end January 2025
Automation.Engine 24.3.0 - Available

 

Additional Information

Defect ID: DE154501

Defect Description: A problem has been solved where agents did not reconnect when an agent connection on the same JCP already existed.
Before this fix, the JCP tried to ping the existing agent connection. If there was no reply for a certain period of time (duplicateTimeout in ucsrv.ini = 60 seconds), the new agent connection was shut down.
With this fix the agent will not stop, and the onboarding of the agent continues.