You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code works on MRI 2.2.1, but fails with Errno::ENETUNREACH every time on JRuby 9.0.4.0:
require"net/http"require"uri"uri=URI.parse('http://icanhazip.com/')request=Net::HTTP::Get.new(uri.request_uri)net_http=Net::HTTP.new(uri.host,uri.port)net_http.local_host="<your ipv6 address>"#in my particular case "2607:5300:60:5fae::"net_http.request(request).body
here's the stack trace I get:
Errno::ENETUNREACH: Network is unreachable - No message available
from org/jruby/ext/socket/RubyTCPSocket.java:138:in `initialize'
from org/jruby/RubyIO.java:1123:in `open'
from /usr/local/rvm/rubies/jruby-9.0.4.0/lib/ruby/stdlib/net/http.rb:883:in `block in connect'
from org/jruby/ext/timeout/Timeout.java:128:in `timeout'
from /usr/local/rvm/rubies/jruby-9.0.4.0/lib/ruby/stdlib/net/http.rb:882:in `connect'
from /usr/local/rvm/rubies/jruby-9.0.4.0/lib/ruby/stdlib/net/http.rb:867:in `do_start'
from /usr/local/rvm/rubies/jruby-9.0.4.0/lib/ruby/stdlib/net/http.rb:856:in `start'
from /usr/local/rvm/rubies/jruby-9.0.4.0/lib/ruby/stdlib/net/http.rb:1389:in `request'
from (irb):8:in `<eval>'
from org/jruby/RubyKernel.java:978:in `eval'
from org/jruby/RubyKernel.java:1291:in `loop'
from org/jruby/RubyKernel.java:1098:in `catch'
from org/jruby/RubyKernel.java:1098:in `catch'
from /usr/local/rvm/rubies/jruby-9.0.4.0/bin/irb:13:in `<top>'
(not sure if it matters but I'm running ubuntu 12.04 with both ipv4 and ipv6 addresses)
The text was updated successfully, but these errors were encountered:
The following code works on MRI 2.2.1, but fails with
Errno::ENETUNREACH
every time on JRuby 9.0.4.0:here's the stack trace I get:
(not sure if it matters but I'm running ubuntu 12.04 with both ipv4 and ipv6 addresses)
The text was updated successfully, but these errors were encountered: