Port Binding Failure on the Server (EI0019)

Symptom

A log contains the error code EI0019, as shown below:

[PID: 2267203] 2025-11-21-11:38:29.575.404 Communication_Error_Bind_IP_Port(EI0019): Failed to enable listening for the host network adapter socket.Reason: The IP address 192.168.1.100 and port 50001 have already been bound.

The CANN logs contain the keyword "socket type[2], *** Please check the port status and whether the port is being used by other process," as shown below. Port binding may fail during connection setup on the parameter plane when the communication operator is dispatched. Check the socket type in the error logs to determine the failure. If the type is 2, port binding fails on the host NIC during communicator cluster negotiation. For the Atlas A3 training product/Atlas A3 inference product and Atlas A2 training product/Atlas A2 inference product, if the type is 0 or 1, port binding fails on the parameter plane. For details, see Port Binding Failure on the Parameter Plane (EI0019).

[ERROR] HCCL(3626636,all_reduce_test):2025-11-21-13:18:47.639.860 [hccl_socket.cc:110] [3626636][InitChannelStage][RanktableDetect] socket type[2], listen on ip[192.168.1.100%enp53s0f2] and specific port[60000] fail. Please check the port status and whether the port is being used by other process.
[ERROR] HCCL(3626636,all_reduce_test):2025-11-21-13:18:47.639.869 [topoinfo_detect.cc:744] [3626636][InitGroupStage][RanktableDetect]StartRootNetwork failed, ret[7]
[ERROR] HCCL(3626636,all_reduce_test):2025-11-21-13:18:47.639.874 [topoinfo_detect.cc:233] [3626636][InitGroupStage][RanktableDetect]SetupServer failed, hostIP[192.168.1.100%enp53s0f2] and hostPort[60000] ret[7]
[ERROR] HCCL(3626636,all_reduce_test):2025-11-21-13:18:47.639.882 [op_base.cc:1071] [3626636][InitGroupStage][RanktableDetect]HcclGetRootInfo failed, ret[7]

Possible Cause

During communicator creation, HCCL needs to bind ports 60000 to 60031 by default. If the ports have already been bound, HCCL fails to bind the ports. As a result, the communicator fails to be created.

Solution

Configure the port range as follows:

  • Use the HCCL_IF_BASE_PORT environment variable to specify the start port number of the host NIC and set the reserved port range.
  • For the Atlas A3 training product/Atlas A3 inference product and Atlas A2 training product/Atlas A2 inference product, if multiple processes need to be executed on a single NPU, use HCCL_HOST_SOCKET_PORT_RANGE to set the HCCL communication port range on the host to avoid port conflicts among these processes.