pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Rubygems Connectivity Issues
With a fresh install of ruby19, I find I am unable to install Gems.
bash-2.05# gem19 install ohai --verbose --no-ri --no-rdoc --debug
Exception `NameError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/command_manager.rb:177
- uninitialized constant Gem::Commands::InstallCommand
Exception `SocketError' at
/opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:644 - getaddrinfo: no
address
Exception `Gem::RemoteFetcher::FetchError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/remote_fetcher.rb:246
- SocketError: getaddrinfo: no address
(http://rubygems.org/latest_specs.4.8.gz)
WARNING: Error fetching data: SocketError: getaddrinfo: no address
(http://rubygems.org/latest_specs.4.8.gz)
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=systemu
version=2.5.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=yajl-ruby
version=1.1.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=mixlib-cli
version=1.2.2>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification
name=mixlib-config version=1.1.2>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=mixlib-log
version=1.3.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=ipaddress
version=0.8.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=ohai
version=0.6.12>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=systemu
version=2.5.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=yajl-ruby
version=1.1.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=mixlib-cli
version=1.2.2>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification
name=mixlib-config version=1.1.2>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=mixlib-log
version=1.3.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=ipaddress
version=0.8.0>
Exception `NoMethodError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/specification.rb:1495
- undefined method `to_ary' for #<Gem::Specification name=ohai
version=0.6.12>
Installing gem systemu-2.5.0
Downloading gem systemu-2.5.0.gem
Exception `SocketError' at
/opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:644 - getaddrinfo: no
address
Exception `Gem::RemoteFetcher::FetchError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/remote_fetcher.rb:246
- SocketError: getaddrinfo: no address
(http://rubygems.org/gems/systemu-2.5.0.gem)
Exception `Gem::RemoteFetcher::FetchError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/remote_fetcher.rb:137
- SocketError: getaddrinfo: no address
(http://rubygems.org/gems/systemu-2.5.0.gem)
Exception `Gem::RemoteFetcher::FetchError' at
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/dependency_installer.rb:282
- SocketError: getaddrinfo: no address
(http://rubygems.org/gems/systemu-2.5.0.gem)
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: no address
(http://rubygems.org/gems/systemu-2.5.0.gem)
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/remote_fetcher.rb:246:in
`rescue in fetch_path'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/remote_fetcher.rb:232:in
`fetch_path'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/remote_fetcher.rb:135:in
`download'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/dependency_installer.rb:278:in
`block in install'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/dependency_installer.rb:270:in
`each'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/dependency_installer.rb:270:in
`each_with_index'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/dependency_installer.rb:270:in
`install'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/commands/install_command.rb:121:in
`block in execute'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/commands/install_command.rb:115:in
`each'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/commands/install_command.rb:115:in
`execute'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/command.rb:278:in
`invoke'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/command_manager.rb:147:in
`process_args'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/command_manager.rb:117:in
`run'
/opt/omnibus/bootstrap/lib/ruby/site_ruby/1.9/rubygems/gem_runner.rb:65:in
`run'
/opt/omnibus/bootstrap/bin/gem19:30:in `<main>'
There's nothing wrong with DNS:
bash-2.05# dig rubygems.org
; <<>> DiG 8.3 <<>> rubygems.org
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUERY SECTION:
;; rubygems.org, type = A, class = IN
;; ANSWER SECTION:
rubygems.org. 22S IN A 204.232.149.25
rubygems.org. 22S IN A 204.232.149.26
;; Total query time: 24 msec
;; FROM: sol9 to SERVER: default -- 8.8.8.8
;; WHEN: Mon Apr 30 01:53:19 2012
;; MSG SIZE sent: 30 rcvd: 62
I am able to ping rubygems.org:
sh-2.05# ping rubygems.org
rubygems.org is alive
Nsswitch is set to use DNS:
bash-2.05# grep ^hosts /etc/nsswitch.conf
hosts: files dns
I suspected net/http isn't functioning correctly... to test this I opened irb:
bash-2.05# irb19
irb(main):001:0> require 'net/http'
=> true
irb(main):002:0> uri = URI.parse("http://rubygems.org")
=> #<URI::HTTP:0x50a258 URL:http://rubygems.org>
irb(main):003:0> response = Net::HTTP.get_response(uri)
SocketError: getaddrinfo: no address
from /opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:644:in `initialize'
from /opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:644:in `open'
from /opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:644:in
`block in connect'
from /opt/omnibus/bootstrap/lib/ruby/1.9/timeout.rb:44:in `timeout'
from /opt/omnibus/bootstrap/lib/ruby/1.9/timeout.rb:89:in `timeout'
from /opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:644:in `connect'
from /opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:637:in `do_start'
from /opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:626:in `start'
from /opt/omnibus/bootstrap/lib/ruby/1.9/net/http.rb:393:in
`get_response'
from (irb):3
from /opt/omnibus/bootstrap/bin/irb19:12:in `<main>'
Fishy...
irb(main):003:0> require 'socket'
=> true
irb(main):004:0> Socket.gethostbyname('localhost')
SocketError: getaddrinfo: no address
from (irb):4:in `gethostbyname'
from (irb):4
from /opt/omnibus/bootstrap/bin/irb19:12:in `<main>'
irb(main):005:0> Socket.gethostbyname('google.com')
SocketError: getaddrinfo: no address
from (irb):5:in `gethostbyname'
from (irb):5
from /opt/omnibus/bootstrap/bin/irb19:12:in `<main>'
Apologies if this is off-topic, but I would expect
Socket#gethostbyname to work out of the box. Has anyone seen anything
like this before? What could be plausible explanations?
S.
Home |
Main Index |
Thread Index |
Old Index