Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was evaluating some SSL failures, and noticed that when I use curl to one of the failing sites, I got curl: (56) SSL read: errno -5961; however, my google queries for that error didn't show the reason for the openssl failure.

Question: What does it mean when curl fails with curl: (56) SSL read: errno -5961?


I'm including the complete curl below...

[mpenning@mpenning-lnx ~]$ curl -vk https://192.0.2.168/
* About to connect() to 192.0.2.168 port 443 (#0)
*   Trying 192.0.2.168... connected
* Connected to 192.0.2.168 (192.0.2.168) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*       subject: CN=foo-console,L=New York,OU=IT Infrastructure,O=Sesame Street
*       start date: Aug 21 23:36:51 2013 GMT
*       expire date: Aug 21 23:36:51 2015 GMT
*       common name: foo-console
*       issuer: CN=foo-console,L=New York,OU=IT Infrastructure,O=Sesame Street
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 192.0.2.168
> Accept: */*
>
< HTTP/1.1 200 OK
* SSL read: errno -5961
* Closing connection #0
curl: (56) SSL read: errno -5961
[mpenning@mpenning-lnx ~]$

NOTE:

I am answering my own question, in hopes of helping future googlers.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The root cause of the issue wound up being a layer2 MTU mismatch, which caused the openssl socket to time out part of the way through the curl transaction. Full MTU-sized packets (i.e. 1500 byte IP payloads) failed because one side of the layer2 tunnel would not allow them through.

Other people seeing this error may not have an MTU mismatch, but it could be anything that causes an SSL session to timeout part of the way through the curl.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.