Temporary failure in name resolution

H

hemant kumar

Within my rails application, I make exactly one connection to a drb server,
using following code:


def connect_to_drb
DRb.start_service #line no 29 of program
begin
@drb_con = DRbObject.new(nil, 'druby://'+@drb_ip.strip)
@con_type = 'drb'
return @drb_con
rescue
@drb_con = nil
return nil
end
end

And strangely it gives me following error sometime.I stress, only sometimes.
I guess, I don't need to do "DRb.start_service" to connect to drb server.But
still, I would like to know the reason.

I am on Ubuntu dapper server edition.running ruby 1.8.4 and using mongrel +
apache2.2 mod_proxy_balancer


SocketError (getaddrinfo: Temporary failure in name resolution):
/usr/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'
/usr/lib/ruby/1.8/drb/drb.rb:837:in `open_server_inaddr_any'
/usr/lib/ruby/1.8/drb/drb.rb:860:in `open_server'
/usr/lib/ruby/1.8/drb/drb.rb:756:in `open_server'
/usr/lib/ruby/1.8/drb/drb.rb:754:in `open_server'
/usr/lib/ruby/1.8/drb/drb.rb:1336:in `initialize'
/usr/lib/ruby/1.8/drb/drb.rb:1624:in `start_service'
/lib/connection_class.rb:29:in `connect_to_drb'
/lib/connection_class.rb:92:in `get_data_from_drb'
/lib/connection_class.rb:85:in `get_data'
/app/controllers/price_controller.rb:49:in `popupchart'
 
H

hemant kumar

Also, as a follow up,

I can very well, do "DRb.start_service" from command prompt.


-----Original Message-----
From: hemant kumar [mailto:[email protected]]
Sent: Wednesday, August 16, 2006 7:37 PM
To: ruby-talk ML
Subject: Temporary failure in name resolution


Within my rails application, I make exactly one connection to a drb server,
using following code:


def connect_to_drb
DRb.start_service #line no 29 of program
begin
@drb_con = DRbObject.new(nil, 'druby://'+@drb_ip.strip)
@con_type = 'drb'
return @drb_con
rescue
@drb_con = nil
return nil
end
end

And strangely it gives me following error sometime.I stress, only sometimes.
I guess, I don't need to do "DRb.start_service" to connect to drb server.But
still, I would like to know the reason.

I am on Ubuntu dapper server edition.running ruby 1.8.4 and using mongrel +
apache2.2 mod_proxy_balancer


SocketError (getaddrinfo: Temporary failure in name resolution):
/usr/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'
/usr/lib/ruby/1.8/drb/drb.rb:837:in `open_server_inaddr_any'
/usr/lib/ruby/1.8/drb/drb.rb:860:in `open_server'
/usr/lib/ruby/1.8/drb/drb.rb:756:in `open_server'
/usr/lib/ruby/1.8/drb/drb.rb:754:in `open_server'
/usr/lib/ruby/1.8/drb/drb.rb:1336:in `initialize'
/usr/lib/ruby/1.8/drb/drb.rb:1624:in `start_service'
/lib/connection_class.rb:29:in `connect_to_drb'
/lib/connection_class.rb:92:in `get_data_from_drb'
/lib/connection_class.rb:85:in `get_data'
/app/controllers/price_controller.rb:49:in `popupchart'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top