国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

requests - python request HTTPS報錯54, 'Connection reset by peer
高洛峰
高洛峰 2017-04-17 17:53:26
0
2
1794

最新更新:
1、目標是本地電腦(開發(fā)環(huán)境)request一個API,取得返回的JSON。
2、本地使用request請求API的https地址時,報了這個錯。
3、本地使用request請求別的網(wǎng)址:zhihu.comgithub.com,都用https,則不會出錯。
4、上自己的一臺服務器請求這個API則也不報錯。

也不知道問題出在哪里。


用python request 一個自己弄的https網(wǎng)站,報錯:

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

但是request其他https網(wǎng)站正常。
自己的這個https網(wǎng)站在Postman等接口調(diào)試軟件下又正常。

用openssl s_client -connect 域名的443端口,返回

CONNECTED(00000003)
write:errno=54

請教大神一個查錯的思路。。

高洛峰
高洛峰

擁有18年軟件開發(fā)和IT教學經(jīng)驗。曾任多家上市公司技術總監(jiān)、架構師、項目經(jīng)理、高級軟件工程師等職務。 網(wǎng)絡人氣名人講師,...

reply all(2)
PHPzhong

Solved.
The reason is that ssl_protocols TLSv1.2 TLSv1.1 on the server no longer supports TLSv1. Without TLSv1 support, this error will occur if the OpenSSL in the MAC is not the latest version.

Solution: Enable TLSv1 support on the server, or update OpenSSL on your computer.

Peter_Zhu

If there is no problem accessing in the browser, it should be a lack of headers. Copy all the headers in the browser and try again

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template