Error: could not translate host name "localhost.aptible.in" to address

I’m getting the following error when attempting to tunnel to my Aptible database and was curious if you all have come across this before and could point me in the right direction for a solution?

pg_dump: error: could not translate host name "localhost.aptible.in" to address: nodename nor servname provided, or not known

Thanks!

Typically when we see this error, it is because the user is working behind a DNS server that blocks .in domains. Some (especially government) users block .in domains in an attempt to block sites hosted in India. Aptible uses the aptible.in domain for “internal” addresses, to keep things separate from aptible.com; it does not denote anything to do with India in our case. If this is a DNS server on a network you control, I recommend looking into your network’s DNS configuration to try to remove this rule or add an exception.

Otherwise, I’d recommend you switching to a different DNS server that does not block these domains. To switch to Google’s DNS server ( 8.8.8.8 ) on a Mac, you can:

  • Open “System Preferences” from the  menu bar item
  • Click “Network”
  • Click “Advanced”
  • Select the “DNS” tab
  • Click the “+” under “DNS Servers” and add 8.8.8.8
  • Click “OK”
  • Click “Apply”

Also, localhost.aptible.in always resolves to 127.0.0.1 , so if you just need to make this work short-term you can replace localhost.aptible.in in the connection URL with 127.0.0.1 as a workaround.

Hope that helps!