messense / aliyundrive-webdav

阿里云盘 WebDAV 服务
MIT License
9.62k stars 1.09k forks source link

命令行启动webdav,解析https://websv.aliyundrive.com/token/refresh失败,但是浏览器可以打开,curl也可以 #290

Closed mwcodefun closed 2 years ago

mwcodefun commented 2 years ago

问题描述

系统环境: Ubuntu 21.10 gnome

安装方法

sudo snap install aliyundrive-webdav

cat /etc/resolv.conf

nameserver 223.5.5.5
options edns0 trust-ad
search lan

curl https://websv.aliyundrive.com/token/refresh

{"timestamp":"2022-02-09T03:56:37.130+00:00","status":404,"error":"Not Found","message":"No message available","path":"/token/refresh~"}

nslookup websv.aliyundrive.com

Server:     223.5.5.5
Address:    223.5.5.5#53

Non-authoritative answer:
Name:   websv.aliyundrive.com
Address: 101.200.125.2

aliyundrive-webdav --refresh-token "xxxx"

2022-02-09T03:58:06.341398Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:07.343578Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:08.344619Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:09.345712Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:10.347046Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:11.348527Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:12.349970Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:13.351118Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2022-02-09T03:58:14.352056Z ERROR aliyundrive_webdav::drive: refresh token failed: error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
Error: initialize aliyundrive client failed

重现步骤

如上

版本

aliyundrive-webdav 1.2.2

运行平台

ubuntu x86

日志

如上

mwcodefun commented 2 years ago

怀疑我的路由器挂了代理的原因,连了下手机热点,出现同样的问题。

Oosl commented 2 years ago

我在腾讯云的服务器上(CentOS 7.9)部署也出现了相同的问题:

aliyundrive-webdav    | 2022-02-12T01:16:15.284119Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Try again 

docker compose内分别指定dns 223.5.5.5和指定本地的代理都没有用。

host上curl https://websv.aliyundrive.com/token/refresh一切正常:

{"code":"MethodNotAllowed","message":"Request method 'GET' not supported","requestId":"73b58dea-6394-4333-8239-f1194781effc"}%  

我在本地的openwrt路由器上(R2S,)就正常运行,没有异常。

Oosl commented 2 years ago

我在腾讯云的服务器上(CentOS 7.9)部署也出现了相同的问题:

aliyundrive-webdav    | 2022-02-12T01:16:15.284119Z  WARN aliyundrive_webdav::drive: refresh token failed, will wait and retry error=error sending request for url (https://websv.aliyundrive.com/token/refresh): error trying to connect: dns error: failed to lookup address information: Try again 

docker compose内分别指定dns 223.5.5.5和指定本地的代理都没有用。

host上curl https://websv.aliyundrive.com/token/refresh一切正常:

{"code":"MethodNotAllowed","message":"Request method 'GET' not supported","requestId":"73b58dea-6394-4333-8239-f1194781effc"}%  

我在本地的openwrt路由器上(R2S,)就正常运行,没有异常。

。。。重启了一次服务器,然后就好了

messense commented 2 years ago

Thanks @Oosl