Open RUTHDOMINGUEZ8216 opened 8 months ago
请问是参考这里填写的么?https://qd-today.github.io/qd/zh_CN/toolbox/pusher.html#telegram-bot-%E6%8E%A8%E9%80%81
如果是的话可以开启DEBUG模式看一看具体日志
幫我同學回答~ 還是不行, QD_DEBUG=True. 還是不行,錯誤空白 EDIT: 是完全依照您的文檔設定的,參數都沒錯 完整日志:
[D 240102 09:34:10 asyncio selector_events:54] Using selector: EpollSelector
[I 240102 09:34:10 QD.Worker worker:292] Queue Worker start...
[I 240102 09:34:10 QD.Run run:86] Http Server started on 0.0.0.0:80
[D 240102 09:34:10 QD.Worker worker:341] Schedule Producer started
[D 240102 09:34:10 QD.Worker worker:317] Runner 0 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 1 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 2 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 3 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 4 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 5 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 6 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 7 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 8 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 9 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 10 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 11 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 12 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 13 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 14 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 15 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 16 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 17 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 18 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 19 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 20 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 21 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 22 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 23 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 24 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 25 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 26 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 27 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 28 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 29 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 30 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 31 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 32 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 33 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 34 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 35 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 36 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 37 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 38 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 39 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 40 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 41 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 42 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 43 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 44 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 45 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 46 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 47 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 48 started
[D 240102 09:34:10 QD.Worker worker:317] Runner 49 started
[I 240102 09:34:17 tornado.access web:2344] 200 GET /my/ (172.71.146.209) 162.03ms
[I 240102 09:34:24 tornado.access web:2344] 200 GET /util/toolbox/1 (172.71.146.209) 3.99ms
[I 240102 09:34:26 tornado.access web:2344] 200 GET /user/1/regpush (172.71.146.209) 5.70ms
[I 240102 09:34:56 tornado.access web:2344] 200 GET /util/toolbox/1 (172.71.146.209) 1.02ms
[I 240102 09:34:58 tornado.access web:2344] 200 GET /user/1/regpush (172.71.146.209) 1.17ms
[E 240102 09:35:33 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 09:35:33 tornado.access web:2344] 200 POST /user/1/regpush (172.71.146.209) 30040.96ms
请问是参考这里填写的么?https://qd-today.github.io/qd/zh_CN/toolbox/pusher.html#telegram-bot-%E6%8E%A8%E9%80%81
如果是的话可以开启DEBUG模式看一看具体日志
其中一個function 報錯了。可是具體不知道怎麼回事。sent to telegram error...
删除后面所有的分号试下
删除后面所有的分号试下
試過了一樣無效。
https://github.com/qd-today/qd/blob/4d9640d7be4d8684575a379d7ff2c0d6d0f21dde/libs/funcs.py#L205
好奇怪,这个异常或许没有异常信息呀
方便的话,能否将libs/funcs.py
的第205行改为logger_Funcs.error('Sent to Telegram error,Exception type: %s, details: %s', type(e),e)
,看看能否捕捉到Exception的类型
额额,这样好像没有用,或许是https://github.com/qd-today/qd/blob/4d9640d7be4d8684575a379d7ff2c0d6d0f21dde/libs/funcs.py#L40
这里抛出的异常
或许可以将这一行改成raise Exception(f'response error,status: {res.status}, reason:{res.reason}, text: {text}')
试一下
raise Exception(f'response error,status: {res.status}, reason:{res.reason}, text: {text}')
代回答: 試了兩個地方都改了,沒有新的錯誤信息.... 錯誤那邊是空白...
[I 240120 22:14:51 tornado.access web:2344] 200 GET /my/ (162.158.186.204) 200.80ms
[I 240120 22:14:57 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 4.66ms
[I 240120 22:14:58 tornado.access web:2344] 200 GET /user/1/pushsw (162.158.186.204) 45.88ms
[I 240120 22:15:01 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 0.95ms
[I 240120 22:15:02 tornado.access web:2344] 200 GET /user/1/regpush (162.158.186.204) 5.75ms
[I 240120 22:15:16 tornado.access web:2344] 200 POST /user/1/UserPushShowPvar (162.158.186.204) 45.22ms
[E 240120 22:15:54 QD.Http.Funcs funcs:206] Sent to Telegram error:
[I 240120 22:15:54 tornado.access web:2344] 200 POST /user/1/regpush (162.158.186.204) 30365.18ms
TG無法用之後,想用email,按照文檔上的說明,設定了env variables之後還是不行,... 發現沒有收到email,日志裡有: 這個框架域名是什麼... 在哪裡設置
[E 240120 21:57:32 QD.Http.Funcs funcs:449] Send mail error: 请配置框架域名 domain, 以启用邮箱推送功能!
[E 240120 21:58:02 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240120 21:58:02 QD.Worker worker:242] taskid:21 tplid:14 successed! 31.59639s
[I 240120 21:58:02 QD.Worker worker:246] taskid:21 tplid:14 clear log.
[I 240120 21:58:49 QD.Worker worker:308] Last 60 seconds, 1 task done. 1 success, 0 failed
raise Exception(f'response error,status: {res.status}, reason:{res.reason}, text: {text}')
代回答: 試了兩個地方都改了,沒有新的錯誤信息.... 錯誤那邊是空白...
[I 240120 22:14:51 tornado.access web:2344] 200 GET /my/ (162.158.186.204) 200.80ms [I 240120 22:14:57 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 4.66ms [I 240120 22:14:58 tornado.access web:2344] 200 GET /user/1/pushsw (162.158.186.204) 45.88ms [I 240120 22:15:01 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 0.95ms [I 240120 22:15:02 tornado.access web:2344] 200 GET /user/1/regpush (162.158.186.204) 5.75ms [I 240120 22:15:16 tornado.access web:2344] 200 POST /user/1/UserPushShowPvar (162.158.186.204) 45.22ms [E 240120 22:15:54 QD.Http.Funcs funcs:206] Sent to Telegram error: [I 240120 22:15:54 tornado.access web:2344] 200 POST /user/1/regpush (162.158.186.204) 30365.18ms
TG無法用之後,想用email,按照文檔上的說明,設定了env variables之後還是不行,... 發現沒有收到email,日志裡有: 這個框架域名是什麼... 在哪裡設置
[E 240120 21:57:32 QD.Http.Funcs funcs:449] Send mail error: 请配置框架域名 domain, 以启用邮箱推送功能! [E 240120 21:58:02 QD.Http.Funcs funcs:205] Sent to Telegram error: [I 240120 21:58:02 QD.Worker worker:242] taskid:21 tplid:14 successed! 31.59639s [I 240120 21:58:02 QD.Worker worker:246] taskid:21 tplid:14 clear log. [I 240120 21:58:49 QD.Worker worker:308] Last 60 seconds, 1 task done. 1 success, 0 failed
domain可以配置为IP:PORT
格式或者网址格式,不需要加http/https
前缀,可以在启动前设置环境变量DOMAIN
,也可以在
https://github.com/qd-today/qd/blob/4d9640d7be4d8684575a379d7ff2c0d6d0f21dde/config.py#L29
这里配置
raise Exception(f'response error,status: {res.status}, reason:{res.reason}, text: {text}')
代回答: 試了兩個地方都改了,沒有新的錯誤信息.... 錯誤那邊是空白...
[I 240120 22:14:51 tornado.access web:2344] 200 GET /my/ (162.158.186.204) 200.80ms [I 240120 22:14:57 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 4.66ms [I 240120 22:14:58 tornado.access web:2344] 200 GET /user/1/pushsw (162.158.186.204) 45.88ms [I 240120 22:15:01 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 0.95ms [I 240120 22:15:02 tornado.access web:2344] 200 GET /user/1/regpush (162.158.186.204) 5.75ms [I 240120 22:15:16 tornado.access web:2344] 200 POST /user/1/UserPushShowPvar (162.158.186.204) 45.22ms [E 240120 22:15:54 QD.Http.Funcs funcs:206] Sent to Telegram error: [I 240120 22:15:54 tornado.access web:2344] 200 POST /user/1/regpush (162.158.186.204) 30365.18ms
TG無法用之後,想用email,按照文檔上的說明,設定了env variables之後還是不行,... 發現沒有收到email,日志裡有: 這個框架域名是什麼... 在哪裡設置
[E 240120 21:57:32 QD.Http.Funcs funcs:449] Send mail error: 请配置框架域名 domain, 以启用邮箱推送功能! [E 240120 21:58:02 QD.Http.Funcs funcs:205] Sent to Telegram error: [I 240120 21:58:02 QD.Worker worker:242] taskid:21 tplid:14 successed! 31.59639s [I 240120 21:58:02 QD.Worker worker:246] taskid:21 tplid:14 clear log. [I 240120 21:58:49 QD.Worker worker:308] Last 60 seconds, 1 task done. 1 success, 0 failed
domain可以配置为
IP:PORT
格式或者网址格式,不需要加http/https
前缀,可以在启动前设置环境变量DOMAIN
,也可以在https://github.com/qd-today/qd/blob/4d9640d7be4d8684575a379d7ff2c0d6d0f21dde/config.py#L29
这里配置
謝謝,配置了.... (Telegrtam還是不行,也沒有任何錯誤的LOG>.....)唉,不過email 配置,他log說有送出,可是沒收到... domain的我寫的是我email server 的FQDN (mail.myexample.com)
[D 240122 16:25:20 QD.Worker worker:89] Start push batch log for user 1, email:xxxxxxxxx@gmail.com
[E 240122 16:25:50 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240122 16:25:50 QD.Worker worker:92] Success push batch log for user 1, email:xxxxxxxxxx@gmail.com
@SupercoolBD 这是我的配置格式(最后这个自定义域名是我的tg代理)
0000000000:aaaaaaaaaaaaa00aaaaaaaa0a0aaaaaa0a0;000000000;tg.mydomain.com
我这里是20230821版本,这个配置下tg能够正常推送
raise Exception(f'response error,status: {res.status}, reason:{res.reason}, text: {text}')
代回答: 試了兩個地方都改了,沒有新的錯誤信息.... 錯誤那邊是空白...
[I 240120 22:14:51 tornado.access web:2344] 200 GET /my/ (162.158.186.204) 200.80ms [I 240120 22:14:57 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 4.66ms [I 240120 22:14:58 tornado.access web:2344] 200 GET /user/1/pushsw (162.158.186.204) 45.88ms [I 240120 22:15:01 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.204) 0.95ms [I 240120 22:15:02 tornado.access web:2344] 200 GET /user/1/regpush (162.158.186.204) 5.75ms [I 240120 22:15:16 tornado.access web:2344] 200 POST /user/1/UserPushShowPvar (162.158.186.204) 45.22ms [E 240120 22:15:54 QD.Http.Funcs funcs:206] Sent to Telegram error: [I 240120 22:15:54 tornado.access web:2344] 200 POST /user/1/regpush (162.158.186.204) 30365.18ms
TG無法用之後,想用email,按照文檔上的說明,設定了env variables之後還是不行,... 發現沒有收到email,日志裡有: 這個框架域名是什麼... 在哪裡設置
謝謝,配置了.... (Telegrtam還是不行,也沒有任何錯誤的LOG>.....)唉,不過email 配置,他log說有送出,可是沒收到... domain的我寫的是我email server 的FQDN (mail.myexample.com)
[D 240122 16:25:20 QD.Worker worker:89] Start push batch log for user 1, email:xxxxxxxxx@gmail.com [E 240122 16:25:50 QD.Http.Funcs funcs:205] Sent to Telegram error: [I 240122 16:25:50 QD.Worker worker:92] Success push batch log for user 1, email:xxxxxxxxxx@gmail.com
现在可以升级至最新 dev
版容器并设置环境变量 TRACEBACK_PRINT=True
或者开启 debug
模式以开启查看错误日志详情了, 我这边捕获到的错误日志是
[E 240203 23:00:30 QD.Http.Funcs funcs:202] Sent to Telegram error:
Traceback (most recent call last):
File "/usr/src/app/libs/funcs.py", line 194, in send2tg
async with session.post(link, json=d, verify_ssl=False, proxy=proxy, timeout=config.request_timeout) as res:
File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 1167, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 493, in _request
with timer:
File "/usr/lib/python3.11/site-packages/aiohttp/helpers.py", line 725, in __exit__
raise asyncio.TimeoutError from None
TimeoutError
可以看出来是请求超时了, 从你的日志
[I 240120 22:15:54 tornado.access web:2344] 200 POST /user/1/regpush (162.158.186.204) 30365.18ms
看到刚好是 30 秒的请求响应, 因此大概率也是请求超时. 建议检查一下看是不是你的容器或网络无法访问 Telegram.
Verify steps
QD Version
20230821
Bug on OS
Linux
Bug on Platform
Docker/Linux 64位
To Reproduce
按照步驟填寫完畢之後,推送失敗。不在內地沒有牆。![Screenshot_20240102_031355_Brave.jpg](https://img.ii.free.hr/personal/Screenshot_20240102_031355_Brave.jpg)
Describe the Bug
如圖所示推送失敗。沒有原因。![Screenshot_20240102_031355_Brave.jpg](https://img.ii.free.hr/personal/Screenshot_20240102_031355_Brave.jpg)
QD config
QD log
Expected behavior
正常推送
Screenshots
No response