当前位置:   article > 正文

requests.exceptions.ConnectionError:HTTPSConnectionPool(host_requests.exceptions.connectionerror: httpconnectio

requests.exceptions.connectionerror: httpconnectionpool(host='127.0.0.1', po

requests.exceptions.ConnectionError: HTTPSConnectionPool(host=

应用场景(爬虫一)

使用requests.get()请求链接报错,具体不知为何好像是请求头的问题(建议换请求头或不用请求头, 本人是没用请求头,总之换代理或UA)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='127.0.0.1', port=443):
Max retries exceeded with url:
/?cdn=nohost (Caused by NewConnectionError
('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f81968ac470>:
Failed to establish a new connection: [Errno 111] Connection refused',))
  • 1
  • 2
  • 3
  • 4
  • 5

应用场景(爬虫二)

下面这种是利用appium抓时报的错误。因appium服务器没有开,或者链接错误

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=4723): 
Max retries exceeded with url: 
/wd/hub/session (Caused by NewConnectionError
('<urllib3.connection.HTTPConnection object at 0x0000000003517D68>:
Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。',))
  • 1
  • 2
  • 3
  • 4
  • 5

应用场景(爬虫三)

2020-03-12 出现原因,本人测试开了十个线程访问一个谷歌,导致ip被封了
本人换了ip 果断解决了

requests.exceptions.ConnectionError: 
HTTPSConnectionPool(host='play.google.com', port=443): 
Max retries exceeded with url: /store/apps/details?id=com.*****.india 
(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000000000382D550>: 
Failed to establish a new connection: [WinError 10060] 
由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。',))
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

2021-01-06 公司网络访问不通,手机网络能访问; 手机开个热点电脑连接,测试一下通了。尴尬不

HTTPConnectionPool(host='****.gov.cn', port=80): 
Max retries exceeded with url: /sx/list/96
(Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x117f28780>,
'Connection to ***.gov.cn timed out. (connect timeout=20)'))
  • 1
  • 2
  • 3
  • 4

2021-03-24

requests.exceptions.HTTPError: 404 Client Error: Not Found for url
  • 1

应用场景(web 四)

同一宿主机的不同dorcker环境不经过配置不能通信
(2018-10-25)检查docker下环境配置,当时不同环境下配置的主机IP为localhost所以报这个错误。

requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888):
Max retries exceeded with url: /v2/task/accept/ 
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f93f399ceb8>:
Failed to establish a new connection: [Errno 111] Connection refused',))
  • 1
  • 2
  • 3
  • 4

(2019-11-07又出现了错误)这次因为端口的问题报了这个错误
2022-08-16 增加说明 服务端: 不通、检查端口等配置、网络、telnet。爬虫:网络、长城问题。

HTTPConnectionPool(host='', port=8888): Max retries exceeded with url:
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1682cddc50>:
  Failed to establish a new connection: [Errno 110] Connection timed out',))
  • 1
  • 2
  • 3

(2020-01-02又出现了错误)这次因为程序中导包的问题报,导致此错误,导包路径不正确

[Error:] 获取***信息失败,错误信息:HTTPConnectionPool(host='192.168.1**.**', port=8080): 
Max retries exceeded with url: ***** 
(Caused by NewConnectionError('<urllib3HTTPConnection object at 0x7f352f46c1d0>: 
Failed to establish a new connection: [Errno 111] Connection refused',))
  • 1
  • 2
  • 3
  • 4

如有疑问请留言,欢迎批评指正

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/478707
推荐阅读
相关标签
  

闽ICP备14008679号