require 'net/https' fails on 1.7.12 and master if jruby.native.enabled=false #1650

Closed
donv opened this Issue Apr 21, 2014 · 5 comments

3 participants

@donv
JRuby Team member

This works fine on JRuby 1.7.11:

macbeth:~ uwe$ rvm use jruby
Using /Users/uwe/.rvm/gems/jruby-1.7.12
macbeth:~ uwe$ irb
jruby-1.7.12 :001 > require 'net/https'
 => true 
jruby-1.7.12 :002 > exit
macbeth:~ uwe$ rvm use jruby-head
Using /Users/uwe/.rvm/gems/jruby-head
macbeth:~ uwe$ irb
jruby-head :001 > require 'net/https'
 => true 
jruby-head :002 > exit
macbeth:~ uwe$ export JRUBY_OPTS="-J-Djruby.native.enabled=false"
macbeth:~ uwe$ rvm use jruby
Using /Users/uwe/.rvm/gems/jruby-1.7.12
macbeth:~ uwe$ irb
io/console not supported; tty will not be manipulated
jruby-1.7.12 :001 > require 'net/https'
LoadError: Native API access is disabled
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/ffi/ffi.rb:69:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/krypt/provider/ffi.rb:1:in `(root)'
... 26 levels...
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl19/openssl.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1101:in `eval'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl19/openssl.rb:23:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl/load.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl/load.rb:20:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/1.9/net/https.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1501:in `loop'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/1.9/net/https.rb:22:in `(root)'
    from org/jruby/RubyKernel.java:1264:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1264:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/bin/irb:13:in `(root)'jruby-1.7.12 :002 > exit
macbeth:~ uwe$ rvm use jruby-1.7.11
Using /Users/uwe/.rvm/gems/jruby-1.7.11
macbeth:~ uwe$ irb
io/console not supported; tty will not be manipulated
jruby-1.7.11 :001 > require 'net/https'
 => true 
jruby-1.7.11 :002 > exit
macbeth:~ uwe$ rvm use jruby-head
Using /Users/uwe/.rvm/gems/jruby-head
macbeth:~ uwe$ irb
io/console not supported; tty will not be manipulated
jruby-head :001 > require 'net/https'
LoadError: Native API access is disabled
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/ffi/ffi.rb:69:in `(root)'
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/krypt/provider/ffi.rb:1:in `(root)'
... 26 levels...
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl21/openssl.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:881:in `eval'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl21/openssl.rb:23:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl/load.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl/load.rb:15:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/2.1/net/https.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1200:in `loop'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/2.1/net/https.rb:22:in `(root)'
    from org/jruby/RubyKernel.java:1011:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1011:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-head/bin/irb:13:in `(root)'jruby-head :002 > exit
macbeth:~ uwe$ 
@mkristian
JRuby Team member
@donv donv referenced this issue in ruboto/ruboto Apr 22, 2014
Closed

Add support for SSL #154

@donv
JRuby Team member

I am working on getting SSL working on Ruboto (JRuby on Android), and this is a blocker. Is there anything I can do to work around or fix it?

@donv
JRuby Team member

Hi @mkristian and all!

Anything I can do to speed this along? Broken SSL should be a blocker for release.

@mkristian mkristian added this to the JRuby 1.7.13 milestone May 3, 2014
@mkristian mkristian added the openssl label May 3, 2014
@enebo
JRuby Team member

I did not see this until now. What needs to be done here? A new release of krypt and then we bundle it? cc @mkristian @donv

@mkristian
JRuby Team member
@mkristian mkristian closed this Jun 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment