Skip to content
MtrXTools

dial tcp: i/o timeout

Go couldn't connect in time

Seen in Go (net, net/http), Docker, Kubernetes, Terraform

Go could not open the TCP connection, or finish the DNS lookup for it, before the dial timeout.

Common causes

  • A firewall or security group drops packets to the address and port.
  • The host is down or the address is wrong.
  • If the message contains "lookup ... on ...:53", the DNS server itself did not answer.
  • Outbound traffic needs a proxy that is not configured.

How to fix it

  1. Check the address and port in the message are reachable from the same machine.
  2. For "lookup ... on ...:53" timeouts, check the resolver in /etc/resolv.conf or the cluster DNS.
  3. Set HTTPS_PROXY and NO_PROXY if the network requires a proxy.
Check the port from outside

Got a different message? Paste it into the error explainer.

Related errors

All 32 Languages & runtimes errors