Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 公共模板更新失败或更新不完整 #412

Closed
4 tasks done
ICEY1W32 opened this issue May 1, 2023 · 9 comments
Closed
4 tasks done

[Bug] 公共模板更新失败或更新不完整 #412

ICEY1W32 opened this issue May 1, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@ICEY1W32
Copy link

ICEY1W32 commented May 1, 2023

Verify steps

  • Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • Latest 我已经使用 最新源码 测试过,问题依旧存在
  • Core 这是 QianDao 框架存在的问题,并非我所使用的 QianDao早期版本(如 20210628及之前版号 等)或模板的特定问题
  • Meaningful 我提交的不是无意义的 催促更新或修复 请求

QianDao Version

20230430

Bug on OS

Linux

Bug on Platform

Docker/Linux 64位

To Reproduce

更新公共模板提示“更新失败或更新不完整!”
页面显示:

失败原因:
Note: 请刷新页面并修改配置后, 通过强制更新或重建缓存重试!

Describe the Bug

上一版本发现此问题后更新到最新版,仍然无法解决
尝试强制更新、重建缓存、重新注册仓库都无法解决
查看日志,发现没有输出错误原因

QianDao config

No response

QianDao log

[I 230501 13:32:18 qiandao.Run run:89] Http Server started on 0.0.0.0:80
[I 230501 13:32:18 qiandao.Worker worker:422] HolidayWorker start...
[I 230501 13:32:18 qiandao.Worker worker:434] HolidayWorker updating...
[I 230501 13:32:18 qiandao.Worker worker:442] HolidayWorker update success!
[I 230501 13:32:20 tornado.access web:2344] 304 GET /my/ () 169.07ms
[I 230501 13:32:23 tornado.access web:2344] 200 GET /subscribe/1/ () 36.10ms
[I 230501 13:32:26 tornado.access web:2344] 302 POST /subscribe/refresh/1/?op=clear () 9.77ms
[I 230501 13:32:26 tornado.access web:2344] 200 GET /subscribe/1/ () 24.77ms
[E 230501 13:32:56 qiandao.Web.Handler subscribe:140] UserID: 1 update Subscribe failed! Reason: 
[I 230501 13:32:56 tornado.access web:2344] 200 POST /subscribe/1/updating/ () 30526.02ms

Expected behavior

预期正常更新公共模板

Screenshots

image

@ICEY1W32 ICEY1W32 added the bug Something isn't working label May 1, 2023
@ICEY1W32 ICEY1W32 changed the title [Bug] 公共模板更新失败或更新不完整! [Bug] 公共模板更新失败或更新不完整 May 1, 2023
@a76yyyy
Copy link
Contributor

a76yyyy commented May 1, 2023

大概率是因为无法访问github导致, 可以环境变量中设置打开debug模式看看debug日志

@ICEY1W32
Copy link
Author

ICEY1W32 commented May 1, 2023

大概率是因为无法访问github导致, 可以环境变量中设置打开debug模式看看debug日志

确实可能是网络原因

[I 230501 14:30:21 tornado.access web:2344] 302 POST /subscribe/refresh/1/?op=clear () 9.30ms
[I 230501 14:30:21 tornado.access web:2344] 200 GET /subscribe/1/ () 14.89ms
Traceback (most recent call last):
File "/usr/src/app/web/handlers/subscribe.py", line 85, in post
async with session.get(hfile_link, verify_ssl=False, timeout=config.request_timeout) as res:
File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
await resp.start(conn)
File "/usr/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 894, in start
with self._timer:
File "/usr/lib/python3.11/site-packages/aiohttp/helpers.py", line 721, in exit
raise asyncio.TimeoutError from None

TimeoutError
[E 230501 14:30:51 qiandao.Web.Handler subscribe:140] UserID: 1 update Subscribe failed! Reason:
[I 230501 14:30:51 tornado.access web:2344] 200 POST /subscribe/1/updating/ () 30355.74ms

但是我已经设置了代理并确认了代理的连通性。所以我查看了代理的日志,发现更新公共模板并没有走在环境变量中设置的代理
-e http_proxy=http://** -e https_proxy=http://**
而签到则是正常通过代理的

@a76yyyy
Copy link
Contributor

a76yyyy commented May 18, 2023

已修复, 请尝试更新源码或等待20230518版本更新后重试

@caelumlux
Copy link

@a76yyyy
20230618 版本docker镜像无法更新,日志:

Traceback (most recent call last):
  File "/usr/src/app/web/handlers/subscribe.py", line 105, in update
    async with session.get(hfile_link, verify_ssl=False, timeout=config.request_timeout, proxy=proxy) as res:
  File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 467, in _request
    with timer:
  File "/usr/lib/python3.11/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError
[E 230707 17:50:05 QD.Web.Handler subscribe:172] UserID: 1 update Subscribe failed! Reason: TimeoutError

@a76yyyy
Copy link
Contributor

a76yyyy commented Jul 8, 2023

TimeoutError
[E 230707 17:50:05 QD.Web.Handler subscribe:172] UserID: 1 update Subscribe failed! Reason: TimeoutError

超时错误,请注意环境变量配置的代理有专门的变量,不建议用通用的 http_proxy,具体请参考框架文档

@ICEY1W32
Copy link
Author

ICEY1W32 commented Jul 8, 2023

TimeoutError
[E 230707 17:50:05 QD.Web.Handler subscribe:172] UserID: 1 update Subscribe failed! Reason: TimeoutError

超时错误,请注意环境变量配置的代理有专门的变量,不建议用通用的 http_proxy,具体请参考框架文档

这个专门的环境变量对模板编辑页面无效 ,是否统一一下比较好,目前两种环境变量都设置才能正常使用。
另外部分模板需要0626版本,希望能尽快更新稳定版

@a76yyyy
Copy link
Contributor

a76yyyy commented Jul 8, 2023

TimeoutError
[E 230707 17:50:05 QD.Web.Handler subscribe:172] UserID: 1 update Subscribe failed! Reason: TimeoutError

超时错误,请注意环境变量配置的代理有专门的变量,不建议用通用的 http_proxy,具体请参考框架文档

这个专门的环境变量对模板编辑页面无效 ,是否统一一下比较好,目前两种环境变量都设置才能正常使用。 另外部分模板需要0626版本,希望能尽快更新稳定版

模板编辑页面以_proxy作为代理变量,详见框架首页左上角 常用API/过滤器

@ICEY1W32
Copy link
Author

ICEY1W32 commented Jul 8, 2023

TimeoutError
[E 230707 17:50:05 QD.Web.Handler subscribe:172] UserID: 1 update Subscribe failed! Reason: TimeoutError

超时错误,请注意环境变量配置的代理有专门的变量,不建议用通用的 http_proxy,具体请参考框架文档

这个专门的环境变量对模板编辑页面无效 ,是否统一一下比较好,目前两种环境变量都设置才能正常使用。 另外部分模板需要0626版本,希望能尽快更新稳定版

模板编辑页面以_proxy作为代理变量,详见框架首页左上角 常用API/过滤器

我看源码的意思应该是在没有设置_proxy的时候,默认使用的http_proxy通用环境变量,而不是专门的PROXY ?

@caelumlux
Copy link

TimeoutError
[E 230707 17:50:05 QD.Web.Handler subscribe:172] UserID: 1 update Subscribe failed! Reason: TimeoutError

超时错误,请注意环境变量配置的代理有专门的变量,不建议用通用的 http_proxy,具体请参考框架文档

我用docker run 的方式错误消失了,应该是docker网络引起的,之前进去容器能正常访问外部网络,目前不清楚原因。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants