zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
30.31k stars 7.97k forks source link

docker中出现异常中断 经常出现重复扫描登录的情况 #1207

Open hudingwen opened 1 year ago

hudingwen commented 1 year ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Linux

运行的python版本是?

python 3.10

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

发送问题后并回答之后就再也没有回答过内容了

问题描述 😯

异常退出 需要频繁扫描

终端日志 📒

[DEBUG][2023-06-03 10:09:21][chat_channel.py:264] - Worker return success, session_id = @5a7c7efbf60f8f0299a8976746f4b3cf Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1685787073408&skey=%40crypt_e158e97_5ed3492d0301e167a813f3a9df897d03&sid=76tqGtsKVS0cBgv1&uin=2184007572&deviceid=e455602141630520&synckey=1_815443772%7C2_815443827%7C3_815443764%7C11_815443804%7C19_33248%7C23_1685785146%7C24_1685786961%7C27_1263%7C201_1685786938%7C203_1685785205%7C206_103%7C1000_1685777460%7C10011685777462&=1685785146380 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib/itchat/components/login.py", line 356, in sync_check r = self.s.get(url, params=params, headers=headers, File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get return self.request("GET", url, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 563, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1685787073408&skey=%40crypt_e158e97_5ed3492d0301e167a813f3a9df897d03&sid=76tqGtsKVS0cBgv1&uin=2184007572&deviceid=e455602141630520&synckey=1_815443772%7C2_815443827%7C3_815443764%7C11_815443804%7C19_33248%7C23_1685785146%7C24_1685786961%7C27_1263%7C201_1685786938%7C203_1685785205%7C206_103%7C1000_1685777460%7C10011685777462&=1685785146380 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/lib/itchat/components/login.py", line 295, in maintain_loop i = sync_check(self) File "/app/lib/itchat/components/login.py", line 360, in sync_check if not isinstance(e.args[0].args[1], BadStatusLine): IndexError: tuple index out of range

zhayujie commented 1 year ago

你运行的环境在哪,海外服务器吗

LQY96 commented 1 year ago

me too

dustookk commented 1 month ago

一样的问题,一样的域名 webpush.wx2.qq.com, 运行时间一长就会报和 @hudingwen 一样的错误日志

服务器在 北京, 启动方式是 sudo nohup python3 app.py > log.log 2>&1 &