读取SSL错误:错误-5961

时间:2018-06-17 14:44:47

标签: php ssl curl centos7

从curl生产服务器发送发布请求时,会返回SSL错误:errno -5961

完全退出:

* Trying xxx.xx.xxx.xxx...
* TCP_NODELAY set
* Connected to my.site.ru (xxx.xx.xxx.xxx) port 443 (#0)
* Initializing NSS with certpath: sql: / etc/pki/nssdb
* CAfile: none
  CApath: none
* loaded libnsskkbi.so
* ALPN/NPN, server did not agree to a protocol
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject: CN=*.site.ru,OU=PositiveSSL Wildcard,OU=Domain Control Validated
* start date: May 16 00: 00: 00 2018 GMT
* expire date: Jun 01 23:59: 59 2019 GMT
* common name:*.arbitr.ru
* issuer: CN=COMODO RSA Domain Validation Secure server CA, O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB
> POST /site/url HTTP/1.1
Host: my.site.ru
Connection: keep-alive
Content-Length: 2589
Origin: https://my.site.ru
x-date-format: iso
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Content-Type: application/json
Accept: application/ json, text / javascript,*/*; q=0.01
X-Requested-With: XMLHttpRequest
Referer: https://my.site.ru/url
Accept-Encoding: gzip, deflate, br
Accept-Language: ru-ru,ru;q=0.8,en-US;q=0.6,en;q=0.4
Cookie:.ASPXAUTH=47668568CBC0C7D64E29AB1E4AF40B73B640472;
Expect: 100-continue

< HTTP/1.1 100 Continue
* We are completely uploaded and fine
* SSL read: errno -5961 (PR_CONNECT_RESET_ERROR)
* TCP connection reset by peer
* stopped the pause stream!
* Closing connection 0

PHP代码:

curl_setopt($curl, CURLOPT_URL, 'https://my.site.ru/url');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_VERBOSE, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $q);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT , 0);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($curl,CURLOPT_FOLLOWLOCATION,true);
curl_setopt ($curl, CURLOPT_HTTPHEADER,$split);
$out = curl_exec($curl);

我无法在测试版本上重现这个问题。

环境centos7,php 5.6,curl 7.60

0 个答案:

没有答案