Help Center/ Cloud Container Instance/ FAQs/ Network Management FAQs/ What Do I Do If the Connection Timed Out?
Updated on 2023-02-07 GMT+08:00

What Do I Do If the Connection Timed Out?

Symptom

Pods can be created, but the message "[Errno 110] Connection timed out" is displayed when the Python Django SMTP service is used to send emails.

Possible Cause

  • You have purchased only ELB but not NAT Gateway. Therefore, containers can be accessed only from the external network. Containers can access the external network after you purchase a NAT Gateway.
  • Port 25 is prohibited from sending messages to secure the network environment.

Solution

  • Solution 1: Use the NAT Gateway service to enable container instances (pods) in a VPC to access public networks. The NAT Gateway service provides source network address translation (SNAT), which translates private IP addresses to a public IP address by binding an elastic IP address (EIP) to the gateway, providing secure and efficient access to the Internet. For details, see Accessing Public Networks from a Container.
  • Solution 2: Contact technical support to allow port 25 of your new EIP.