-
-
Notifications
You must be signed in to change notification settings - Fork 285
Open
Description
Hi,
I am having trouble with timeouts when looking up some domains. I am slightly confused about what I might be doing differently/weirdly, because I would expect others to be having the same problem. Looking up using the whois CLI tool works fine.
Code:
#!/usr/bin/env ruby
require 'whois'
p Whois::VERSION
whois = Whois::Client.new(:timeout => 30)
record = whois.lookup('aelius.com')
if record.nil? or record.parts.empty?
raise "Error: unable to load whois"
end
p recordResult:
"5.0.0"
Traceback (most recent call last):
12: from test.rb:8:in `<main>'
11: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/client.rb:91:in `lookup'
10: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/2.5.0/timeout.rb:108:in `timeout'
9: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/client.rb:94:in `block in lookup'
8: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/adapters/base.rb:112:in `lookup'
7: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/adapters/base.rb:151:in `buffer_start'
6: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/adapters/base.rb:113:in `block in lookup'
5: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/adapters/verisign.rb:33:in `request'
4: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/adapters/base.rb:183:in `query'
3: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/socket_handler.rb:38:in `call'
2: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/socket_handler.rb:55:in `execute'
1: from /Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/socket_handler.rb:55:in `new'
/Users/njh/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/whois-5.0.0/lib/whois/server/socket_handler.rb:55:in `initialize': execution expired (Timeout::Error)
Ruby version:
$ ruby -v
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin18]
Any advice on how to diagnose the problem further would be appreciated.
Thanks,
nick.
yunixon
Metadata
Metadata
Assignees
Labels
No labels