You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Version: 3.1.8
- Operating System: Windows 11, Microsoft Windows [版本 10.0.22631.4037]- Browser (if used):
Log file
W 2024/10/08 14:54:08 net.go:136: check url [https://x.x.x:1234/] is online failed: Get "https://x.x.x:1234/": context deadline exceeded
W 2024/10/08 14:54:12 net.go:136: check url [https://x.x.x:1234/] is online failed: Get "https://x.x.x:1234/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
W 2024/10/08 14:54:12 net.go:90: network is offline [checkURL=https://x.x.x:1234/]
More information
kernel\util\net.go的isOnline方法如下:
func isOnline(checkURL string, skipTlsVerify bool) (ret bool) {
c := req.C().SetTimeout(3 * time.Second)
if skipTlsVerify {
c.EnableInsecureSkipVerify()
}
c.SetUserAgent(UserAgent)
for i := 0; i < 2; i++ {
resp, err := c.R().Get(checkURL)
if resp.GetHeader("Location") != "" {
return true
}
switch err.(type) {
case *url.Error:
if err.(*url.Error).URL != checkURL {
// DNS 重定向
logging.LogWarnf("network is online [DNS redirect, checkURL=%s, retURL=%s]", checkURL, err.(*url.Error).URL)
return true
}
}
ret = err == nil
if ret {
break
}
time.Sleep(1 * time.Second)
logging.LogWarnf("check url [%s] is online failed: %s", checkURL, err)
}
return
}
The text was updated successfully, but these errors were encountered:
使用IPV6的DNS解析慢导致云端同步失败
Is there an existing issue for this?
Can the issue be reproduced with the default theme (daylight/midnight)?
Could the issue be due to extensions?
Describe the problem
1、在“设置”->“云端”配置页面,将“云端存储服务提供商”设置为S3,将“Endpoint”设置为内网IPv4地址,“Timeout (s)”配置为30s,在设置“云端同步目录”时,可以在1秒内获取到存储目录并配置,手工点击“同步”时,可以正常同步。
2、流程同上,其他配置不变,将“Endpoint”设置为IPv6地址对应的DNS域名,可以在30秒内获取到存储目录并配置,手工点击“同步”时,提示“云端存储服务提供商网络连通性校验异常,请检查网络配置 (Provider: S3) v3.1.8”。
3、查看日志,见日志文件,错误位置是:kernel\util\net.go 136行,错误信息是:context deadline exceeded
4、通过错误查找,需要优化的是:kernel\util\net.go 108行,c := req.C().SetTimeout(3 * time.Second),默认的超时时间只有3秒,导致IPv6的DNS域名无法解析完成。
Expected result
kernel\util\net.go的isOnline方法检测云端存储服务是否在线时,使用配置的“Timeout (s)”时间或默认30s,可以正常同步数据。
Screenshot or screen recording presentation
No response
Version environment
Log file
W 2024/10/08 14:54:08 net.go:136: check url [https://x.x.x:1234/] is online failed: Get "https://x.x.x:1234/": context deadline exceeded
W 2024/10/08 14:54:12 net.go:136: check url [https://x.x.x:1234/] is online failed: Get "https://x.x.x:1234/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
W 2024/10/08 14:54:12 net.go:90: network is offline [checkURL=https://x.x.x:1234/]
More information
kernel\util\net.go的isOnline方法如下:
The text was updated successfully, but these errors were encountered: