How to fix "Connection closed by IP port 22" or "Remote Side Unexpectedly closed by network connection " on a Network Management Card
Issue:
How to fix "Connection closed by IP port 22" or "Remote Side Unexpectedly closed by network connection " on a Network Management Card
Product Line:
Network Management Card 2 (NMC2) - AP9630/AP9631 version 6.x.x above
- Devices with an embedded Network Management Card 2 include (but are not limited to): Early model 2G Metered/Switched Rack PDUs (AP78, AP79, AP84, AP86, AP88, AP89), Rack Automatic Transfer Switches (AP44XX), Certain Audio/Video Network Management Enabled products, Early model Smart-UPS Online (SRT).
Network Management Card 3 (NMC3) - AP9640/AP9641 version 1.x.x.x above
- Devices with an embedded Network Management Card 3 include (but are not limited to): Metered/Switched Rack PDUs (AP78, AP79, AP84, AP86, AP88, AP89, APDU9), Rack Automatic Transfer Switches (AP44A), Smart-UPS Online (SRT), SRTL2K-3K, Smart-UPS Modular Ultra 5kva to 20kva.
Network Management Card 3 (NMC3) - AP9544, AP9547
Environment:
All serial numbers
Cause:
The "Connection closed by IP port 22 or Remote Side Unexpectedly closed by network connection" error occurs when the Network Management Card has an active SSH/Telnet/Network CLI connection and cannot accept any new connections.
Resolution:
The network card accepts five(5) active combined SSH/Telnet/Network CLI session. You can clear active or stuck user sessions by directly connecting to the Network Management Card. The following steps highlight how to delete active or stuck user session using a direct connection.
Note: If the Network Management Card (NMC) Telnet session keeps looping back to the terminal emulation screen or does not provide any response after entering telnet <IP address>, please check whether the maximum number of active connections has been reached, as this may prevent new Telnet sessions from being established.
Disclaimer: Before terminating an active connection, first confirm its purpose. The connection may be supporting an important task, such as diagnostics, or system maintenance. Disconnecting it without verification may disrupt operations or cause unexpected issues. When unsure, seek clarification before proceeding.
Click on the options below to see more:
For NMC Web GUI
1. Open an NMC Web GUI session.
2. Log in using the NMC username and password.
3. Navigate to Control -->Security -->Session Management to terminate/view sessions.
4. Click on a Username --> Terminate Session. Note: Only a Super User or Administrator has this capability
Using Terminal Emulation (local/direct connection) via APC configuration cable
Terminal Emulation is a built-in function on most operating systems (ex: HyperTerminal). Before using any terminal emulation program, any services using the COM ports must be stopped. For example, if you are running a serial version of APC's PowerChute software, the APC UPS service must be stopped prior to running the terminal program. Then, follow these instructions:
NOTE: If you have the scroll lock on, HyperTerminal will not communicate properly with an APC UPS or accessory.
Connect to the UPS/device serial port using the correct APC configuration cable. Part numbers are below for common devices. Please refer to the User Guide if you are not sure or your device is not listed.
!WARNING! - Connecting a non-APC serial cable to your device can cause unwanted, erratic device behavior.
| Device | Configuration Cable Part Number |
| Rack PDU (AP78XX, AP79XX, AP84XX**,AP86XX**, AP88XX**, AP89XX**) | 940-0144 (RJ-12 to DB-9) |
| 1st Generation Rack Automatic Transfer Switch (AP7750 only) | 940-1000 (DB-9 to DB-9) |
| 2nd Generation Rack Automatic Transfer Switch (AP77XX, excludes AP7750) | 940-0144 (RJ-12 to DB-9) |
| 4th Generation Rack Automatic Transfer Switch (AP44XX**) | 940-0144 (RJ-12 to DB-9) |
| NetBotz 200/Environmental Monitoring (AP9319, AP9340, AP9320) | 940-0103 (DB-9 to DB-9) |
| Rack Air Removal Unit (ACF400, ACF402) | 940-0103 (DB-9 to DB-9) |
After connecting the correct cable, start the terminal emulation program of your choice. Configure port settings appropriately for the device you are attached to (refer to the User Guide for the particular device). Commonly used port settings are as follows:
| Device | COM Port Settings |
| Rack PDU | 9600 bps, 8 data bits, no parity, 1 stop bit, and no flow control. |
| 1st Generation Rack Automatic Transfer Switch (AP7750) | 19,200 bps, 8 data bits, no parity, 1 stop bit, and no flow control for initial configuration, 2400 bps for NMC configuration - refer to user's manual for more information |
| 2nd Generation Rack Automatic Transfer Switch (AP77XX, excludes AP7750) | 9600 bps, 8 data bits, no parity, 1 stop bit, and no flow control |
| NetBotz 200/Environmental Monitoring (AP9319, AP9340, AP9320) | 9600 bps, 8 data bits, no parity, 1 stop bit, and no flow control. |
| Rack Air Removal Unit | 9600 bps, 8 data bits, no parity, 1 stop bit, and no flow control. |
1. Log in using the NMC username and password.
2. Type "session" to view active connections.
3. Type "session -d [ID]" to delete a specific session (e.g., session -d 23).
Note: Repeat steps until all unnecessary web sessions have been removed.
4. Once there are no active sessions, exit Direct/Local Connection.
5. Try to access the SSH/Telnet/Network CLI session and confirm that access is good.
In most cases, this issue can be resolved by reseating the network card or restarting it through SSH, Telnet, or the card's pinhole reset button.
Should there be any other questions and/or concerns, feel free to reach out to us at 1-800-800-4272 or via chat with our technical support group at APC by Schneider Electric Customer Technical Support