Problem: Automic Agent can't be started - Failed to bind
search cancel

Problem: Automic Agent can't be started - Failed to bind

book

Article ID: 418986

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine Automic SaaS

Issue/Introduction

The agent fails to start or terminates shortly after startup. The log file shows a java.net.BindException indicating that the configured port is already occupied by another process.

Symptoms

The agent log contains the following error stack:

U02000328 Unexpected error on listen port occurred, reason '2300', position 'java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:2300'.
U00045014 Exception 'java.io.IOException: "java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:2300"' at 'com.automic.agent.jetty.server.WebSocketServer.open():51'.
U00045015 The previous error was caused by 'java.io.IOException: "Failed to bind to 0.0.0.0/0.0.0.0:2300"' at 'org.eclipse.jetty.server.ServerConnector.openAcceptChannel():349'.
U00045015 The previous error was caused by 'java.net.BindException: "Address already in use: bind"' at 'sun.nio.ch.Net.bind0()'.
U02000041 Shutdown Agent 'Agent_Name'.
U02000010 Connection to Server 'AE_Server/<unresolved>:8443' terminated.
U02000002 Agent 'Agent_Name' version '24.4.2+hf.1.build.1759570320937' ended abnormally.

Environment

  • Automic Automation Engine
  • Windows Agent (ucxjwx6.ini)
  • Linux/Unix Agent (ucxjlx6.ini)

Cause

The port specified in the agent's INI file is already in use by another service or another instance of the agent.

Resolution

  1. Identify the process currently using the port (default is often 2300).
    • Windows: Run netstat -ano | findstr "PORT"
    • Linux/Unix: Run netstat -nap | grep PORT
  2. If another process is using the port, either stop that process or select a different port for the Automic agent.
  3. To change the agent port, open the agent INI file (ucxjwin.ini or ucxjlx6.ini).
  4. Locate the [TCP/IP] section.
  5. Update the port= parameter to an available port number.
  6. Save the file and restart the agent.

For more information on INI configurations, see the Agent INI file documentation.

Additional Information

All the ports in use can be found with the netstat command:

netstat -ano | findstr "2300 PID"

This delivers the following result:

 Proto  Local Address           Foreign Address        State           PID
  TCP    0.0.0.0:2300           0.0.0.0:0              LISTENING       2472
  TCP    [::]:2300              [::]:0                 LISTENING       2472

In this particular case, Port 2300 is already in use by another Windows agent.