Checking port connectivity is one of the important steps in troubleshooting connection issues in Tair (Redis OSS-compatible).
Background information
You are unable to connect to Tair (Redis OSS-compatible), but the ping command shows a successful connection between the Elastic Compute Service (ECS) instance and the Tair instance. In this case, you must use the telnet command to check whether the service port of Tair is available.
Prerequisites
The Telnet client is installed on a Linux ECS instance or the Telnet client is enabled on a Windows ECS instance.
Procedure
View the endpoint of the Tair instance. For more information, see View endpoints.
Log on to the ECS instance and run the following command in the CLI:
telnet <host> 6379
NoteIn this command,
<host>
specifies the endpoint that you obtained in Step 1.6379 is the default port number of the Tair (Redis OSS-compatible) instance.
You can run this command in both Windows and Linux operating systems.
Check the test result. The following examples show the results of running the command in Linux and Windows.
The following figures show that the telnet connection is successful.
The following figures show that the telnet connection failed.
Result analysis
If a connection issue occurs on the Tair instance, but you can use telnet to connect the ECS instance to the Tair instance, the connection between the ECS instance and the Tair instance is normal. You need to investigate other factors, such as the client, business code, and potential service blocking issues related to the business environment. For more information, see How do I troubleshoot connection issues in Tair?
If the telnet connection fails, but the ping command shows a successful connection between the ECS instance and the Tair instance, the ECS instance probably has abnormal behavior and some services are disabled. For example, the ECS instance attacks port 6379 of the Tair instance due to malicious programs. In this case, we recommend that you monitor the data on the ECS instance to locate and handle abnormal traffic, or submit a ticket to request technical support.
If the telnet connection fails and the
Name or service not known
error is reported, the endpoint may be incorrect or a Domain Name System (DNS) resolution error occurs. Make sure that the endpoint is correct, and refer to How do I troubleshoot connection issues caused by failed DNS resolution? to resolve the issue.If the telnet connection fails and the ping command shows a failed connection between the ECS instance and the Tair instance, refer to How do I troubleshoot connection issues in Tair? to resolve the issue.