fjqndxx-v2 icon indicating copy to clipboard operation
fjqndxx-v2 copied to clipboard

[长期问题] 代理IP不稳定 失败情况居多

Open TheRainTime opened this issue 2 years ago • 5 comments

问题描述

使用的版本

python:[e.g. 3.7] version:[e.g. 1.2.2]

完整的运行日志

[71](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:71)
[INFO]:消息推送成功
[72](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:72)
Error: :异常信息: 请阅读异常提醒,如果无法解决请截图日志发issue):HTTPSConnectionPool(host='m.fjcyl.com', port=443): Max retries exceeded with url: /mobileNologin (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))
[73](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:73)
Traceback (most recent call last):
[74](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:74)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
[75](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:75)
    httplib_response = self._make_request(
[76](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:76)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request
[77](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:77)
    six.raise_from(e, None)
[78](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:78)
  File "<string>", line 3, in raise_from
[79](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:79)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request
[80](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:80)
    httplib_response = conn.getresponse()
[81](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:81)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/http/client.py", line 1377, in getresponse
[82](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:82)
    response.begin()
[83](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:83)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/http/client.py", line 320, in begin
[84](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:84)
    version, status, reason = self._read_status()
[85](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:85)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/http/client.py", line 289, in _read_status
[86](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:86)
    raise RemoteDisconnected("Remote end closed connection without"
[87](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:87)
http.client.RemoteDisconnected: Remote end closed connection without response
[88](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:88)

[89](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:89)
During handling of the above exception, another exception occurred:
[90](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:90)

[91](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:91)
Traceback (most recent call last):
[92](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:92)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
[93](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:93)
    resp = conn.urlopen(
[94](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:94)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
[95](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:95)
    retries = retries.increment(
[96](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:96)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
[97](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:97)
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
[98](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:98)
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='m.fjcyl.com', port=443): Max retries exceeded with url: /mobileNologin (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))
[99](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:99)

[100](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:100)
During handling of the above exception, another exception occurred:
[101](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:101)

[102](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:102)
Traceback (most recent call last):
[103](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:103)
  File "/home/runner/work/tk-auto-study/tk-auto-study/main.py", line 40, in catch
[104](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:104)
    return func(*args, **kwargs)
[105](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:105)
  File "/home/runner/work/tk-auto-study/tk-auto-study/main.py", line 275, in run
[106](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:106)
    single_study(username, pwd, pub_key)
[107](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:107)
  File "/home/runner/work/tk-auto-study/tk-auto-study/main.py", line 250, in single_study
[108](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:108)
    login(username, password, pub_key)
[109](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:109)
  File "/home/runner/work/tk-auto-study/tk-auto-study/main.py", line 166, in login
[110](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:110)
    post_login(username, pwd, pub_key)
[111](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:111)
  File "/home/runner/work/tk-auto-study/tk-auto-study/main.py", line 105, in post_login
[112](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:112)
    resp = sess.post(url="https://m.fjcyl.com/mobileNologin",
[113](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:113)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/requests/sessions.py", line 577, in post
[114](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:114)
    return self.request('POST', url, data=data, json=json, **kwargs)
[115](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:115)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
[116](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:116)
    resp = self.send(prep, **send_kwargs)
[117](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:117)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
[118](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:118)
    r = adapter.send(request, **kwargs)
[119](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:119)
  File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/requests/adapters.py", line 513, in send
[120](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:120)
    raise ProxyError(e, request=request)
[121](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:121)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='m.fjcyl.com', port=443): Max retries exceeded with url: /mobileNologin (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))
[122](https://github.com/TheRainTime/tk-auto-study/runs/5956237186?check_suite_focus=true#step:5:122)
Error: Process completed with exit code 255.

TheRainTime avatar Apr 09 '22 17:04 TheRainTime

代理ip不稳定的问题暂时没有解决方案

saddit avatar Apr 11 '22 08:04 saddit

可以换成本地IP吗?

17850773959 avatar Apr 14 '22 06:04 17850773959

可以换成本地IP吗?

不清楚你想表达的意思 代理IP就是为了从Github的IP转到本地IP。使用gitee或者其他平台的话就不需要代理IP

saddit avatar Apr 14 '22 07:04 saddit

如果在本地windows计算机上定时计划任务运行,如何将脚本去掉代理?脚本又该如何设置?是否可以写个教程说明?非常感谢!

wqh966 avatar Apr 14 '22 23:04 wqh966

如果在本地windows计算机上定时计划任务运行,如何将脚本去掉代理?脚本又该如何设置?是否可以写个教程说明?非常感谢!

凡是在本地运行都是直接运行 main.py 不会走代理。参数配置也和服务器一样使用 config.json

saddit avatar Apr 15 '22 14:04 saddit

官方是否会检查境外ip?还是仅是为了正确解析到网站?我的fork有一个自定义dns的feature,如果仅仅是解析网站的话还是做得到的。据我所知,有些网站似乎是通过路由来判断访客来源的?

miscdec avatar Sep 07 '22 15:09 miscdec

@miscdec 国外ip无法建立连接

saddit avatar Sep 08 '22 00:09 saddit

我不太懂,请问在国内用的VPN可以用在这个问题吗?比如我有香港的代理ip,可以使github的ip代理到这个香港的代理ip吗?还是说要用海外代理ip,这样才能代理到国内?

KimLay233 avatar Sep 12 '22 13:09 KimLay233

@KimLay233 使用国内的vpn代理,GitHub Action才能请求成功,这种代理和梯子不太一样,这种称为爬虫代理,但也是有付费的可以选择

saddit avatar Sep 12 '22 13:09 saddit

@KimLay233 使用国内的vpn代理,GitHub Action才能请求成功,这种代理和梯子不太一样,这种称为爬虫代理,但也是有付费的可以选择

明白了,十分感谢

KimLay233 avatar Sep 12 '22 13:09 KimLay233