Port Binding Failure on the Server (EJ0003)
Symptom
The logs contain error information about EJ0003, as shown in the following:
[PID: 2267203] 2025-11-21-11:38:29.575.404 Bind_Failed(EJ0003): Failed to bind the IP port. Reason: The IP address and port have been bound already.
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 in the following. In addition, port binding may fail during connection setup on the parameter plane when the communication operator is delivered. You can determine the port binding failure based on the socket type in the error logs. If the type is 2, the port binding fails for the host NIC during communicator cluster negotiation. If the type is 0 or 1, the port binding fails for the parameter plane. For details, see Port Binding Failure on the Parameter Plane (EJ0003).
[ERROR] HCCL(3626636,all_reduce_test):2000-03-15-13:18:47.639.860 [hccl_socket.cc:110] [3626636][InitChannelStage][RanktableDetect] socket type[2], listen on ip[10.137.69.222%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):2000-03-15-13:18:47.639.869 [topoinfo_detect.cc:744] [3626636][InitGroupStage][RanktableDetect]StartRootNetwork failed, ret[7] [ERROR] HCCL(3626636,all_reduce_test):2000-03-15-13:18:47.639.874 [topoinfo_detect.cc:233] [3626636][InitGroupStage][RanktableDetect]SetupServer failed, hostIP[10.137.69.222%enp53s0f2] and hostPort[60000] ret[7] [ERROR] HCCL(3626636,all_reduce_test):2000-03-15-13:18:47.639.882 [op_base.cc:1071] [3626636][InitGroupStage][RanktableDetect]HcclGetRootInfo failed, ret[7]
Possible Cause
HCCL fails to bound ports. During communicator creation, the 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
You can 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.
- If multiple processes need to be executed on a single NPU, use HCCL_HOST_SOCKET_PORT_RANGE to set the communication port range used by HCCL on the host to avoid port conflicts among multiple processes.