title: OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
body: <p>I have two servers, each running a Rails application (MyApp). One of these servers manages to fetch a wsdl, and the other does not. I have no idea what to do about my error message. Can any one suggest a change to try?</p>
  
  <p>I have already compared the contents of /etc/ssl/certs on the two machines, and they appear to be identical.</p>
  
  <p>On both machines, SSL handshake succeeds with <code>openssl s_client -connect ws2.agencyworks.com:443 -ssl3</code> but fails on Server 2 when <code>-ssl3</code> is not specified. (Alternative to <code>-ssl3</code>, <code>-tls1</code> succeeds on both machines.)</p>
  
  <p>Is there a way to specify a default ssl version for openssl?</p>
  
  <p>A barebones example (Ruby 1.8.7):</p>
  
  <pre><code>http = Net::HTTP.new 'ws2.agencyworks.com', 443
  http.use_ssl = true
  http.get '/EServices/services/StatusSession/wsdl/StatusSession.wsdl'
  
  # Server 1 returns =&gt; #&lt;Net::HTTPOK 200 OK readbody=true&gt;
  # Server 2 errors out: OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
  </code></pre>
  
  <p>Is there a way to specify ssl version in net/http for Ruby 1.8? (I have not found one.)</p>