title: SSL_connect:error in SSLv3 read server hello A
body: <p>I am having troubles with one of our test servers. For some reason when I run </p>
  
  <pre><code>openssl s_client -state -showcerts -connect stg.imotors.com:443
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>CONNECTED(00000003)
  SSL_connect:before/connect initialization
  SSL_connect:SSLv2/v3 write client hello A
  SSL_connect:error in SSLv2/v3 read server hello A
  write:errno=54
  ---
  no peer certificate available
  ---
  No client certificate CA names sent
  ---
  SSL handshake has read 0 bytes and written 308 bytes
  ---
  New, (NONE), Cipher is (NONE)
  Secure Renegotiation IS NOT supported
  Compression: NONE
  Expansion: NONE
  No ALPN negotiated
  SSL-Session:
      Protocol  : TLSv1.2
      Cipher    : 0000
      Session-ID: 
      Session-ID-ctx: 
      Master-Key: 
      Key-Arg   : None
      PSK identity: None
      PSK identity hint: None
      SRP username: None
      Start Time: 1550027343
      Timeout   : 300 (sec)
      Verify return code: 0 (ok)
  </code></pre>
  
  <p>However, when I run the same on the actual server</p>
  
  <pre><code>openssl s_client -state -showcerts -connect www.imotors.com:443
  </code></pre>
  
  <p>It seems to be able to complete the entire handshake:</p>
  
  <pre><code>CONNECTED(00000003)
  SSL_connect:before/connect initialization
  SSL_connect:SSLv2/v3 write client hello A
  SSL_connect:SSLv3 read server hello A
  depth=2 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Certification Authority
  verify error:num=20:unable to get local issuer certificate
  SSL_connect:SSLv3 read server certificate A
  SSL_connect:SSLv3 read server key exchange A
  SSL_connect:SSLv3 read server done A
  SSL_connect:SSLv3 write client key exchange A
  SSL_connect:SSLv3 write change cipher spec A
  SSL_connect:SSLv3 write finished A
  SSL_connect:SSLv3 flush data
  SSL_connect:SSLv3 read finished A
  ---
  Certificate chain
  ....
  
  ---
  No client certificate CA names sent
  Peer signing digest: SHA1
  Server Temp Key: ECDH, P-256, 256 bits
  ---
  SSL handshake has read 4856 bytes and written 490 bytes
  ---
  New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA384
  Server public key is 2048 bit
  Secure Renegotiation IS supported
  Compression: NONE
  Expansion: NONE
  No ALPN negotiated
  SSL-Session:
      Protocol  : TLSv1.2
      Cipher    : ECDHE-RSA-AES256-SHA384
      Session-ID: 003E000....
      Session-ID-ctx: 
      Master-Key: C8F818FA1F6DDF04CFCF08DA59B593D534DA....
      Key-Arg   : None
      PSK identity: None
      PSK identity hint: None
      SRP username: None
      Start Time: 1550027379
      Timeout   : 300 (sec)
      Verify return code: 20 (unable to get local issuer certificate)
  </code></pre>
  
  <p>Both server are using the same wildcard certificate. Any ideas or suggestions how can I troubleshoot this?</p>