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

下载 alist_source_provider 中的文件失败 #456

Closed
xtay573269555 opened this issue Feb 19, 2024 · 6 comments · Fixed by #457
Closed

下载 alist_source_provider 中的文件失败 #456

xtay573269555 opened this issue Feb 19, 2024 · 6 comments · Fixed by #457
Labels
bug Something isn't working

Comments

@xtay573269555
Copy link

下载 alist_source_provider 中的文件失败,所有文件的大小全部是 51B,内容是 {"code":401,"message":"expire missing","data":null}

运行环境:docker
kubespider 版本:cesign/kubespider:v0.6.0
alist 版本:xhofe/alist:v3.30.0

kubespider 日志信息:

2024-02-19 17:20:17,318-INFO: filter downloader type:None, names:['aria2']
2024-02-19 17:20:17,318-INFO: download link type general, with provider size 1
2024-02-19 17:20:17,318-INFO: Download general file with downloader(aria2)
2024-02-19 17:20:17,320-INFO: Start general file download:http://172.16.20.23:5244/d/aliyun_disk_186/book/%E4%BA%8C%E6%AC%A1%E6%88%90%E9%95%BF.mobi?modified=2023-08-13T09:31:06.025Z
2024-02-19 17:20:17,322-INFO: Create download task result:[<aria2p.downloads.Download object at 0x7f4dfdfff5d0>]
2024-02-19 17:20:17,322-INFO: Find new resource:alist_source_provider/http://172.16.20.23:5244/d/aliyun_disk_1...
2024-02-19 17:20:17,323-INFO: filter downloader type:None, names:['aria2']
2024-02-19 17:20:17,323-INFO: download link type general, with provider size 1
2024-02-19 17:20:17,323-INFO: Download general file with downloader(aria2)

使用上述日志中的下载链接进行测试,确实下载不了

[root@docker docker_data]# curl -vvv http://172.16.20.23:5244/d/aliyun_disk_186/book/%E4%BA%8C%E6%AC%A1%E6%88%90%E9%95%BF.mobi?modified=2023-08-13T09:31:06.025Z
*   Trying 172.16.20.23:5244...
* Connected to 172.16.20.23 (172.16.20.23) port 5244
> GET /d/aliyun_disk_186/book/%E4%BA%8C%E6%AC%A1%E6%88%90%E9%95%BF.mobi?modified=2023-08-13T09:31:06.025Z HTTP/1.1
> Host: 172.16.20.23:5244
> User-Agent: curl/8.5.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Mon, 19 Feb 2024 09:26:39 GMT
< Content-Length: 51
< 
* Connection #0 to host 172.16.20.23 left intact
{"code":401,"message":"expire missing","data":null}
[root@docker docker_data]# 

而在 alist 的 web 界面中复制到的下载链接是 http://172.16.20.23:5244/d/aliyun_disk_186/book/%E4%BA%8C%E6%AC%A1%E6%88%90%E9%95%BF.mobi?sign=_TPZjllQ9w8JV5lpa6JwcesRfToR5HJpz3FhfWUzG_A=:0 ,这个链接实测是可用的,它多了一个 sign 参数。

配置:

alist_source_provider:
  enable: false
  type: alist_source_provider
  downloader:
    - aria2
  host: http://172.16.20.23:5244/
  watch_dirs:
    - /aliyun_disk_186/book
@miRemid
Copy link
Collaborator

miRemid commented Feb 19, 2024

感谢反馈有关alist的bug

@miRemid miRemid added the bug Something isn't working label Feb 19, 2024
@miRemid
Copy link
Collaborator

miRemid commented Feb 19, 2024

新版Alist对下载链接进行了过期签名判断,当前版本KS没有兼容该字段,如果你想继续使用KS可以先降级Alist到v3.5.0

我们会在后续尽快修复

@qingchoulove
Copy link
Collaborator

@xtay573269555 hello 临时可以先alist管理(Manage)中关闭对应 storage 的 sign
image

@xtay573269555
Copy link
Author

感谢各位的帮助。

另外,刚才测试了关闭签名的临时解决办法是可用的。除了要在对应的 storage 中关闭 sign,还要在全局配置中关闭 sign 。

2024-02-20_08-47-43

evell1992 added a commit to evell1992/kubespider that referenced this issue Feb 20, 2024
evell1992 added a commit to evell1992/kubespider that referenced this issue Feb 20, 2024
miRemid added a commit that referenced this issue Feb 20, 2024
fix: fix alist download bug(#456)
@richardli1598
Copy link
Contributor

/cat

Copy link
Contributor

gitautomator bot commented Mar 5, 2024

GitAutomator works for your repository.
funny-cat

gitautomator bot pushed a commit that referenced this issue Mar 12, 2024
gitautomator bot added a commit that referenced this issue Mar 12, 2024
Cherry pick PR(457)/fix: fix alist download bug(#456)
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

Successfully merging a pull request may close this issue.

4 participants