Use the telnet command to verify that a specific service port on your Tair (Redis® OSS-Compatible) instance is reachable from an Elastic Compute Service (ECS) instance. This test is the next step when ping succeeds but your application still cannot connect.
Background
Port-level testing fits into a two-step connectivity check:
ping — confirms basic IP-layer reachability between your ECS instance and the Tair instance.
telnet — confirms that the Tair service port (6379) is open and accepting TCP connections.
If ping fails, the problem is at the network layer — skip telnet and go directly to troubleshooting connection issues in Tair. If ping succeeds but you still cannot connect, run the telnet test below.
Prerequisites
Before you begin, make sure the Telnet client is installed (Linux) or enabled (Windows) on your ECS instance.
Test the port
Get the endpoint of your Tair instance. For instructions, see View endpoints.
Log on to the ECS instance and run the following command:
telnet <host> 6379Replace
<host>with the endpoint from step 1. Port6379is the default service port for Tair (Redis® OSS-Compatible). The command works on both Linux and Windows. Figure 1. Run the telnet command in Linux
Figure 2. Run the telnet command in Windows 
Check the result. If the connection succeeds, a banner appears in the terminal. If the connection fails, the command times out or returns an error message. Successful connection Figure 3. Successful telnet connection in Linux
Figure 4. Successful telnet connection in Windows
Failed connection Figure 5. Failed telnet connection in Linux
Figure 6. Failed telnet connection in Windows 
Interpret the result
| Result | What it means | Next action |
|---|---|---|
| Telnet succeeds, but the application still cannot connect | The ECS-to-Tair network path is healthy. The issue is elsewhere. | Check your client, application code, or any service-level blocks in your environment. See How do I troubleshoot connection issues in Tair? |
| Telnet fails + ping succeeds | The ECS instance is reachable but the port is blocked. A malicious program may be attacking port 6379. | Monitor traffic on the ECS instance to locate the abnormal activity, or submit a ticket for technical support. |
Telnet fails + error Name or service not known | The endpoint is incorrect or a Domain Name System (DNS) resolution error has occurred. | Verify the endpoint, then see How do I troubleshoot connection issues caused by failed DNS resolution? |
| Telnet fails + ping also fails | Network-layer connectivity is broken. | See How do I troubleshoot connection issues in Tair? |