Tag Archives: Potholes in development

Curl HTTPS returned errno 35 (SSL connect error) error

CURL HTTPS returns the ERRNO 35(SSL CONNECT ERROR) ERROR
WeChat payments occasionally fail to get a prepay id.
WeChat pay will be asked to get prepay from WeChat server id (https://api.mch.weixin.qq.com/pay/unifiedorder). After we finished the development (the language is PHP, using WeChat’s payment SDK, and using curl to make requests), on the machine in the test environment, we found almost no failure of requests, but after we went online, we found frequent errors, with a probability of 1/5 or even higher. At the beginning, I did not delve into the reasons and tried again. However, I found that as long as I failed, I would fail again.
The curl error recorded is: errno:35, error: SSL Connect Error.
Search relevant information online, did not find a solution. Contact WeChat technical support, they have no Suggestions, think it is our problem, let us check by ourselves.
On our server, we captured packets by tcpdump: Tcpdump – I eth1 IP host 140.207.69.102-w wxpay.cap, comparing the successful and failed packets (using Wireshark analysis) :


failed packets:

failed packets: