Skip to content

OpenSSL::SSL::SSLError: Received fatal alert: handshake_failure #59

Closed
@fjyaniez

Description

@fjyaniez

Hi, I encountered a problem trying to retrieve a page using Net::HTTP through a SSL connection. Maybe I'm missing some configuration?

java

java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

jruby

jruby 1.7.21 (1.9.3p551) 2015-07-07 a741a82 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_51-b16 +jit [linux-amd64]

Gemfile.lock

    jruby-openssl (0.9.8-java)

Steps:

uri = URI.parse('https://balupton.com')

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.get('/')

Output:

OpenSSL::SSL::SSLError: Received fatal alert: handshake_failure
    from org/jruby/ext/openssl/SSLSocket.java:190:in `connect'
    from /home/app/.rvm/rubies/jruby-1.7.21/lib/ruby/1.9/net/http.rb:800:in `connect'
    from org/jruby/ext/timeout/Timeout.java:106:in `timeout'
    from /home/app/.rvm/rubies/jruby-1.7.21/lib/ruby/1.9/net/http.rb:800:in `connect'
    from /home/app/.rvm/rubies/jruby-1.7.21/lib/ruby/1.9/net/http.rb:756:in `do_start'
    from /home/app/.rvm/rubies/jruby-1.7.21/lib/ruby/1.9/net/http.rb:745:in `start'
    from /home/app/.rvm/rubies/jruby-1.7.21/lib/ruby/1.9/net/http.rb:1293:in `request'
    from /home/app/.rvm/rubies/jruby-1.7.21/lib/ruby/1.9/net/http.rb:1035:in `get'
    from (irb):166:in `evaluate'
    from org/jruby/RubyKernel.java:1079:in `eval'
    from org/jruby/RubyKernel.java:1479:in `loop'
    from org/jruby/RubyKernel.java:1242:in `catch'
    from org/jruby/RubyKernel.java:1242:in `catch'
    from /home/app/shared/bundle/jruby/1.9/gems/railties-3.2.22/lib/rails/commands/console.rb:47:in `start'
    from /home/app/shared/bundle/jruby/1.9/gems/railties-3.2.22/lib/rails/commands/console.rb:8:in `start'
    from /home/app/shared/bundle/jruby/1.9/gems/railties-3.2.22/lib/rails/commands.rb:41:in `(root)'
    from org/jruby/RubyKernel.java:1040:in `require'
    from script/rails:6:in `(root)'jruby-1.7.21 :167 >

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25218963-openssl-ssl-sslerror-received-fatal-alert-handshake_failure?utm_campaign=plugin&utm_content=tracker%2F136995&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F136995&utm_medium=issues&utm_source=github).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions