Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"getaddrinfo: Temporary failure in name resolution" in RoR application

I'm trying to retrieve emails from gmail using pop3 to my rails applicaiton. I get the error - "getaddrinfo: Temporary failure in name resolution" when i try to retrieve the email.

the weird thing is, it works when i try it at home but not at my university. i'm guessing it has something to do with the internet connection.

please help!

like image 370
Kartik Rao Avatar asked Jun 14 '10 06:06

Kartik Rao


2 Answers

I had the same problem just started getting this error out of the blue in a RoR application that connects to an API using a RestClient running on a local virtual machine using Vagrant that I have as a development environment.

The only thing that fixed the issue was simply restarting my virtual machine. Just done a vagrant down & up command, then rackup and back in the game.

like image 200
Issa Shabo Avatar answered Oct 30 '22 00:10

Issa Shabo


This generally means you aren't getting a response from DNS. Your university connection is probably behind a proxy preventing you from directly accessing the Internet. If so, this proxy must be specified in your code. Check your POP3 library documentation, or failing that, you may be able to use a library like socksify that redirects TCP connections through your SOCKS proxy.

like image 43
user85509 Avatar answered Oct 30 '22 00:10

user85509