DCS Redis Help Documentation

How Do I Use the telnet Command to Check the Connection to the Service Port of Redis?

2024-05-25 03:50:50

You have installed the Telnet client for Linux or enabled the Telnet client for Windows on the ECS instance. A connection issue has occurred in the Redis service. You can run relevant commands to check the connection between the ECS instance and Redis instance. If the connection is established, you must use the telnet command to check whether the service port is available.

See Viewing Connection Addresses to view the connection address of the Redis instance.

Log in to the ECS instance and run the following command:

 

telnet 198.20.4.61 33016



Description

198.20.4.61 indicates the connection address of the Redis instance.

The port number for Redis is 33016. The port number depends on the actual environment.

You can run this command in both Windows and Linux operating systems.

 

The results are returned as follows. The following uses Linux as an example.

Run the telnet command in the Linux as shown in the following figure.

 

Interface for a failed connection

Result analysis:

If a connection issue occurs in the Redis service, but the ECS instance can connect to the Redis instance using a telnet command, the ECS instance is normally connected to the Redis instance. You need to check other causes, such as clients, service code, and Redis service blocking due to service environment.

If the telnet-based connection fails, but the ECS instance can connect to the Redis instance using the ping command, the ECS instance may have abnormal behaviors. For example, the ECS instance attacks Port 33016 of the Redis instance due to malicious programs. In this case, some services may have been disabled. In this case, we recommend that you monitor the ECS data to identify and handle abnormal traffic.


XknMYRjAsfLc