qd-today / qd

QD [v20240210] —— HTTP请求定时任务自动执行框架 base on HAR Editor and Tornado Server
https://qd-today.github.io/qd/
MIT License
4.46k stars 577 forks source link

[Bug] Telegram 推送不了 #491

Open RUTHDOMINGUEZ8216 opened 11 months ago

RUTHDOMINGUEZ8216 commented 11 months ago

Verify steps

QD Version

20230821

Bug on OS

Linux

Bug on Platform

Docker/Linux 64位

To Reproduce

按照步驟填寫完畢之後,推送失敗。不在內地沒有牆。 Screenshot_20240102_031355_Brave.jpg

Describe the Bug

如圖所示推送失敗。沒有原因。 Screenshot_20240102_031355_Brave.jpg

QD config

version: "3"
services:
  qd:
    image: qdtoday/qd:latest
    # image: qdtoday/qd:lite-latest # 精 简 版
    # image: qdtoday/qd:dev # 开 发 版
    container_name: qd
    restart: always
    depends_on:
      - redis
        #ports:
        #  - "8923:80"
    volumes:
      - "/home/will/od/config:/usr/src/app/config"
    networks:
      - private_network
    environment:
      # - QD_DEBUG=False
      # - BIND=0.0.0.0
      # - PORT=80
      # - MULTI_PROCESS=False
      # - AUTO_RELOAD=False
      # - GZIP=True
      # - ACCESS_LOG=True
      # - DISPLAY_IMPORT_WARNING=True
      # - USER0ISADMIN=True
      # - STATIC_URL_PREFIX=/static/
      - DOMAIN=
      - COOKIE_SECURE_MODE=False
      - COOKIE_SECRET=binux
      - PBKDF2_ITERATIONS=400
      - AES_KEY=binux
      - COOKIE_SECRET=binux
      - PBKDF2_ITERATIONS=400
      - AES_KEY=binux
      # - DB_TYPE=sqlite3
      # - JAWSDB_MARIA_URL=mysql://user:pass@localhost:3306/db
name?auth_plugin=
      # - QD_SQL_LOGGING_NAME=QD.sql
      # - QD_SQL_LOGGING_LEVEL=WARNING
      # - QD_SQL_POOL_LOGGING_NAME=QD.sql.pool
      # - QD_SQL_POOL_LOGGING_LEVEL=WARNING
      # - QD_SQL_POOL_SIZE=5
      # - QD_SQL_MAX_OVERFLOW=10
      # - QD_SQL_POOL_PRE_PING=True
      # - QD_SQL_POOL_RECYCLE=3600
      # - QD_SQL_POOL_TIMEOUT=30
      # - QD_SQL_POOL_USE_LIFO=True
      - REDISCLOUD_URL=redis://redis:6379
      # - REDIS_DB_INDEX=1
      # - QD_EVIL=1000
      # - EVIL_PASS_LAN_IP=True
      # - WORKER_METHOD=Queue
      # - QUEUE_NUM=50
      # - CHECK_TASK_LOOP=500
      # - TASK_MAX_RETRY_COUNT=8
      # - NEW_TASK_DELAY=1
      # - TASK_WHILE_LOOP_TIMEOUT=900
      # - TASK_REQUEST_LIMIT=1500
      # - DOWNLOAD_SIZE_LIMIT=5242880
      # - REQUEST_TIMEOUT=30.0
      # - CONNECT_TIMEOUT=30.0
      # - DELAY_MAX_TIMEOUT=29.9
      # - UNSAFE_EVAL_TIMEOUT=3.0
      # - USE_PYCURL=True
      # - ALLOW_RETRY=True
      # - DNS_SERVER=
      # - CURL_ENCODING=True
      # - CURL_CONTENT_LENGTH=True
      # - NOT_RETRY_CODE=301|302|303|304|305|307|400|401|403|4
04|405|407|408|409|410|412|415|413|414|500|501|502|503|504|599
      # - EMPTY_RETRY=True
      # - TRACEBACK_PRINT=False
      # - PUSH_PIC_URL=https://gitee.com/qd-today/qd/raw/maste
r/web/static/img/push_pic.png
      # - PUSH_BATCH_SW=True
      # - PUSH_BATCH_DELTA=60
      # - WS_PING_INTERVAL=5
      # - WS_PING_TIMEOUT=30
      # - WS_MAX_MESSAGE_SIZE=10485760
      # - WS_MAX_QUEUE_SIZE=100
      # - WS_MAX_CONNECTIONS_SUBSCRIBE=30
      # - SUBSCRIBE_ACCELERATE_URL=jsdelivr_cdn
      # - PROXIES=
      # - PROXY_DIRECT_MODE=regexp
      # - PROXY_DIRECT=(?xi)\A([a-z][a-z0-9+\-.]*://)?(0(.0){3
}|127(.0){2}.1|localhost|\[::([\d]+)?\])(:[0-9]+)?
      # - EXTRA_ONNX_NAME=
      # - EXTRA_CHARSETS_NAME=
      # - MAIL_SMTP=
      # - MAIL_PORT=465
      # - MAIL_SSL=True
      # - MAIL_USER=
      # - MAIL_PASSWORD=
      # - MAIL_FROM=${MAIL_USER}
      # - MAIL_DOMAIN_HTTPS=False
      # - MAILGUN_KEY=
      # - MAILGUN_DOMAIN=${DOMAIN}
      # - GA_KEY=
  redis:
    image: redis:alpine
    container_name: redis
    restart: always
    command: ["--loglevel warning"]
    # command: redis-server /usr/local/etc/redis/redis.conf
    volumes:
      # - ./redis/redis.conf:/usr/local/etc/redis/redis.conf:r
w
      - ./redis/data:/data:rw
    networks:
      - private_network
networks:
  private_network:
    external: true

QD log

[I 240102 02:28:30 tornado.access web:2344] 200 GET /util/toolbox/1 (172.69.34.81) 5.29ms
[I 240102 02:28:34 tornado.access web:2344] 200 GET /user/1/pushsw (172.69.34.81) 82.89ms
[I 240102 02:29:05 tornado.access web:2344] 200 POST /user/1/pushsw (162.158.186.98) 41.68ms
[I 240102 02:29:13 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.186.98) 1.07ms
[I 240102 02:29:17 tornado.access web:2344] 200 GET /user/1/regpush (162.158.186.98) 3.26ms
[I 240102 02:29:30 tornado.access web:2344] 200 POST /util/string/replace (127.0.0.1) 0.85ms
[I 240102 02:29:31 tornado.access web:2344] 200 POST /user/1/regpush (162.158.186.98) 4.94ms
[E 240102 02:30:00 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:30:00 QD.Worker worker:242] taskid:19 tplid:19 successed! 31.30267s
[I 240102 02:30:00 QD.Worker worker:246] taskid:19 tplid:19 clear log.
[I 240102 02:30:20 tornado.access web:2344] 200 POST /user/1/UserPushShowPvar (172.70.214.176) 79.12ms
[E 240102 02:30:20 QD.Web.Handler user:668] UserID: 1 show Push_settings failed! Reason: 请 输 入 用 户 名 /密 码
[I 240102 02:30:31 QD.Worker worker:308] Last 60 seconds, 1 task done. 1 success, 0 failed
[I 240102 02:30:45 tornado.access web:2344] 200 GET /util/toolbox/1 (172.70.214.176) 1.00ms
[I 240102 02:30:49 tornado.access web:2344] 200 GET /task/1/log/total/2 (172.70.214.176) 113.46ms
[I 240102 02:31:48 tornado.access web:2344] 200 GET /util/toolbox/1 (172.70.214.148) 1.18ms
[I 240102 02:34:04 tornado.access web:2344] 200 GET /user/1/regpush (162.158.90.191) 1.35ms
[I 240102 02:34:08 tornado.access web:2344] 200 POST /user/1/UserPushShowPvar (162.158.90.191) 39.75ms
[E 240102 02:35:21 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:35:21 tornado.access web:2344] 200 POST /user/1/regpush (172.70.210.208) 30988.70ms
[E 240102 02:35:53 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:35:53 QD.Worker worker:242] taskid:20 tplid:20 successed! 31.00952s
[I 240102 02:35:53 QD.Worker worker:246] taskid:20 tplid:20 clear log.
[E 240102 02:36:16 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:36:16 tornado.access web:2344] 200 POST /user/1/regpush (172.70.210.208) 30746.28ms
[I 240102 02:36:31 QD.Worker worker:308] Last 60 seconds, 1 task done. 1 success, 0 failed
[E 240102 02:40:07 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:40:07 tornado.access web:2344] 200 POST /user/1/regpush (162.158.91.11) 30666.85ms
[I 240102 02:40:25 tornado.access web:2344] 200 GET /util/toolbox/1 (162.158.91.11) 1.17ms
[I 240102 02:40:27 tornado.access web:2344] 200 GET /user/1/regpush (162.158.91.11) 1.30ms
[E 240102 02:41:21 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:41:21 tornado.access web:2344] 200 POST /user/1/regpush (162.158.91.11) 30310.62ms
[E 240102 02:42:11 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:42:11 tornado.access web:2344] 200 POST /user/1/regpush (162.158.91.11) 30410.14ms
[E 240102 02:46:16 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:46:16 tornado.access web:2344] 200 POST /user/1/regpush (172.69.33.15) 30448.01ms
[E 240102 02:50:33 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:50:33 tornado.access web:2344] 200 POST /user/1/regpush (172.70.211.200) 30936.58ms
[E 240102 02:56:56 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:56:56 tornado.access web:2344] 200 POST /user/1/regpush (172.70.210.11) 30879.92ms
[I 240102 02:57:02 tornado.access web:2344] 200 POST /user/1/regpush (172.70.210.11) 13.15ms
[I 240102 02:57:09 tornado.access web:2344] 200 GET /util/toolbox/1 (172.70.210.11) 1.10ms
[I 240102 02:57:12 tornado.access web:2344] 200 GET /user/1/regpush (172.70.210.11) 1.21ms
[E 240102 02:58:25 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:58:25 tornado.access web:2344] 200 POST /user/1/regpush (172.70.207.72) 30129.19ms
[E 240102 02:59:07 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 02:59:07 tornado.access web:2344] 200 POST /user/1/regpush (172.70.207.72) 30833.22ms
[E 240102 03:02:13 QD.Http.Funcs funcs:205] Sent to Telegram error:
[I 240102 03:02:13 tornado.access web:2344] 200 POST /user/1/regpush (172.70.211.200) 30425.46ms

Expected behavior

正常推送

Screenshots

No response

a76yyyy commented 11 months ago

请问是参考这里填写的么?https://qd-today.github.io/qd/zh_CN/toolbox/pusher.html#telegram-bot-%E6%8E%A8%E9%80%81

如果是的话可以开启DEBUG模式看一看具体日志

SupercoolBD commented 11 months ago

幫我同學回答~ 還是不行, 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
RUTHDOMINGUEZ8216 commented 11 months ago

请问是参考这里填写的么?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...

acooler15 commented 10 months ago

删除后面所有的分号试下

RUTHDOMINGUEZ8216 commented 10 months ago

删除后面所有的分号试下

試過了一樣無效。

acooler15 commented 10 months ago

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}')试一下

SupercoolBD commented 10 months ago

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
acooler15 commented 10 months ago

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 这里配置

SupercoolBD commented 10 months ago

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
Patrick-Ze commented 10 months ago

@SupercoolBD 这是我的配置格式(最后这个自定义域名是我的tg代理)

0000000000:aaaaaaaaaaaaa00aaaaaaaa0a0aaaaaa0a0;000000000;tg.mydomain.com

我这里是20230821版本,这个配置下tg能够正常推送

a76yyyy commented 10 months ago

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.