All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Resolve connection issues caused by DNS failure

Last Updated:Jun 20, 2026

If an ECS instance fails to resolve the endpoint of a Tair (or Redis open-source edition) instance due to a DNS service issue, the network connection between the ECS and Tair instances is interrupted. You can refer to this article to resolve such issues.

Causes

Connection issues between an ECS instance and a Tair instance can occur for various reasons. The following error messages indicate a hostname or endpoint resolution failure. If you encounter one, check your domain name and DNS server settings.

  • Name or service not known

  • UnknownHostException

  • failed to connect: r-***************.redis.rds.aliyuncs.com could not be resolved

Procedure

The following steps use a Linux environment as an example.

  1. Verify that the Tair endpoint configured in your application code is correct.

    Note

    The endpoint for your Tair instance is located in the Endpoint section on the instance details page in the Tair console.

    Figure 1. View endpoints: The connection information includes the network type (VPC and public access), connection type (direct connection endpoint and proxy mode endpoint), the endpoint (for example, r-8vb***.redis.zhangbei.rds.aliyuncs.com), and the port number (the default is 6379). Always use the endpoint to connect to the instance, because its underlying IP address can change during maintenance.

  2. Ensure that the ECS instance is configured with the correct DNS server. For detailed instructions, see What do I do if a Linux instance fails to resolve domain names?.

  3. Optional: If the preceding steps do not resolve the issue, you can use a temporary workaround.

    Add the IP address mapping for the Tair instance's domain name to the /etc/hosts file. Then, refer to the Tair connection troubleshooting workflow document to rule out other potential causes.

    Important

    Be cautious when editing system files such as /etc/hosts or resolv.conf. This modification to /etc/hosts is a temporary solution and will fail if the IP address of the Tair instance changes.