Search code examples
iron.ioironworker

getting openssl error running on iron.io


I get the following error when trying to run a worker on iron.io:

http.rb:920:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure (OpenSSL::SSL::SSLError)

The ruby file that makes the outbound restclient POST to the server works when I run it locally as well as on heroku.

So I know that it is possible to make the call without the error.

I didn't have the problem before, but now started getting it, but not sure how to fix it given that I am running off of the same gems and ruby environment 2.1.0.


Solution

  • If you are using rest-client gem, here is the issue.

    Solution from github ticket:

    res = RestClient::Request.execute :method => :post, :url => url, :ssl_version => 'SSLv23'
    

    or

    :ssl_version => 'TLSv1'