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

[189CloudPC] WebDAV 无法备份/同步,状态码405 #5182

Closed
4 tasks done
devioa opened this issue Sep 6, 2023 · 18 comments
Closed
4 tasks done

[189CloudPC] WebDAV 无法备份/同步,状态码405 #5182

devioa opened this issue Sep 6, 2023 · 18 comments
Labels
bug Something isn't working

Comments

@devioa
Copy link

devioa commented Sep 6, 2023

Please make sure of the following things

  • I have read the documentation.
    我已经阅读了文档

  • I'm sure there are no duplicate issues or discussions.
    我确定没有重复的issue或讨论。

  • I'm sure it's due to AList and not something else(such as Network ,Dependencies or Operational).
    我确定是AList的问题,而不是其他原因(例如网络依赖操作)。

  • I'm sure this issue is not fixed in the latest version.
    我确定这个问题在最新版本中没有被修复。

AList Version / AList 版本

v3.27.0

Driver used / 使用的存储驱动

189pc

Describe the bug / 问题描述

使用支持 WebDAV 的 app 进行备份/同步时返回错误,只有部分文件能成功 PUT,状态码405且后台日志报错

Reproduction / 复现链接

n/a

Config / 配置

{
  "force": false,
  "site_url": "https://cloud.-",
  "cdn": "https://jsd.onmicrosoft.cn/gh/alist-org/web-dist@$version/dist/",
  "jwt_secret": "-",
  "token_expires_in": 168,
  "database": {
    "type": "mysql",
    "host": "-",
    "port": 3306,
    "user": "-",
    "password": "-",
    "name": "_alist",
    "db_file": "data/data.db",
    "table_prefix": "x_",
    "ssl_mode": ""
  },
  "scheme": {
    "address": "0.0.0.0",
    "http_port": 5244,
    "https_port": -1,
    "force_https": false,
    "cert_file": "",
    "key_file": "",
    "unix_file": "",
    "unix_file_perm": ""
  },
  "temp_dir": "data/temp",
  "bleve_dir": "data/bleve",
  "log": {
    "enable": false,
    "name": "log/log.log",
    "max_size": 10,
    "max_backups": 5,
    "max_age": 28,
    "compress": false
  },
  "delayed_start": 0,
  "max_connections": 0,
  "tls_insecure_skip_verify": false
}

Logs / 日志

1
2
3

还试了几个其它支持WebDAV的app,首次同步的时候也会出现:
si
cimoc
但后续同步无异常

@devioa devioa added the bug Something isn't working label Sep 6, 2023
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

@devioa
Copy link
Author

devioa commented Sep 6, 2023

我刚以为可能是同时备份/同步多个文件会这样,但试了下这同步单个文件的好像也有问题
sala
sala0

@foxxorcat
Copy link
Contributor

考虑是否是个人云上传单日容量上限

@xhofe
Copy link
Collaborator

xhofe commented Sep 6, 2023

这日志都是 PROPFIND请求的报错啊 没有PUT的

@devioa
Copy link
Author

devioa commented Sep 6, 2023

考虑是否是个人云上传单日容量上限

应当不是,这些同步的都是些txt或是json之类的小体积文件,除了这些我今天什么都没上传
而且这个问题其实之前我就遇到过了

@foxxorcat
Copy link
Contributor

试过将上传模式改为快传没有,流上传有概率会出问题

@devioa
Copy link
Author

devioa commented Sep 6, 2023

这日志都是 PROPFIND请求的报错啊 没有PUT的

[GIN] 2023/09/06 - 14:10:56 | 401 |      22.409µs |  222.*.*.* | PROPFIND  "/dav/Private/Via/bookmarks.html"
[GIN] 2023/09/06 - 14:10:56 | 207 |     295.157µs |  222.*.*.* | PROPFIND  "/dav/Private/Via/bookmarks.html"
[GIN] 2023/09/06 - 14:10:56 | 401 |      22.346µs |  222.*.*.* | HEAD     "/dav/Private/Via/bookmarks.html"
[GIN] 2023/09/06 - 14:10:56 | 302 |  317.158974ms |  222.*.*.* | HEAD     "/dav/Private/Via/bookmarks.html"
[GIN] 2023/09/06 - 14:10:57 | 401 |      17.732µs |  222.*.*.* | GET      "/dav/Private/Via/bookmarks.html"
[GIN] 2023/09/06 - 14:10:57 | 302 |  179.717208ms |  222.*.*.* | GET      "/dav/Private/Via/bookmarks.html"
[GIN] 2023/09/06 - 14:10:57 | 401 |       19.29µs |  222.*.*.* | PROPFIND  "/dav/Private/Via/favorites.txt"
WARN[2023-09-06 14:10:57] failed get /Private/Via/favorites.txt: object not found
ERRO[2023-09-06 14:10:57] PROPFIND /dav/Private/Via/favorites.txt object not found
github.com/alist-org/alist/v3/internal/op.Get
        /app/internal/op/fs.go:219
github.com/alist-org/alist/v3/internal/fs.get
        /app/internal/fs/get.go:38
github.com/alist-org/alist/v3/internal/fs.Get
        /app/internal/fs/fs.go:36
github.com/alist-org/alist/v3/server/webdav.(*Handler).handlePropfind
        /app/server/webdav/webdav.go:607
github.com/alist-org/alist/v3/server/webdav.(*Handler).ServeHTTP
        /app/server/webdav/webdav.go:74
github.com/alist-org/alist/v3/server.ServeWebDAV
        /app/server/webdav.go:46
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/alist-org/alist/v3/server.WebDAVAuth
        /app/server/webdav.go:112
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/alist-org/alist/v3/server/middlewares.StoragesLoaded
        /app/server/middlewares/check.go:14
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:240
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:576
net/http.serverHandler.ServeHTTP
        /usr/lib/go/src/net/http/server.go:2936
net/http.(*conn).serve
        /usr/lib/go/src/net/http/server.go:1995
runtime.goexit
        /usr/lib/go/src/runtime/asm_amd64.s:1598
[GIN] 2023/09/06 - 14:10:57 | 404 |     337.695µs |  222.*.*.* | PROPFIND  "/dav/Private/Via/favorites.txt"
[GIN] 2023/09/06 - 14:10:57 | 401 |      32.901µs |  222.*.*.* | PROPFIND  "/dav/Private/Via/settings.txt"
WARN[2023-09-06 14:10:57] failed get /Private/Via/settings.txt: object not found
ERRO[2023-09-06 14:10:57] PROPFIND /dav/Private/Via/settings.txt object not found
github.com/alist-org/alist/v3/internal/op.Get
        /app/internal/op/fs.go:219
github.com/alist-org/alist/v3/internal/fs.get
        /app/internal/fs/get.go:38
github.com/alist-org/alist/v3/internal/fs.Get
        /app/internal/fs/fs.go:36
github.com/alist-org/alist/v3/server/webdav.(*Handler).handlePropfind
        /app/server/webdav/webdav.go:607
github.com/alist-org/alist/v3/server/webdav.(*Handler).ServeHTTP
        /app/server/webdav/webdav.go:74
github.com/alist-org/alist/v3/server.ServeWebDAV
        /app/server/webdav.go:46
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/alist-org/alist/v3/server.WebDAVAuth
        /app/server/webdav.go:112
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/alist-org/alist/v3/server/middlewares.StoragesLoaded
        /app/server/middlewares/check.go:14
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:240
github.com/gin-gonic/gin.(*Context).Next
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
        /root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:576
net/http.serverHandler.ServeHTTP
        /usr/lib/go/src/net/http/server.go:2936
net/http.(*conn).serve
        /usr/lib/go/src/net/http/server.go:1995
runtime.goexit
        /usr/lib/go/src/runtime/asm_amd64.s:1598
[GIN] 2023/09/06 - 14:10:57 | 404 |     270.107µs |  222.*.*.* | PROPFIND  "/dav/Private/Via/settings.txt"
[GIN] 2023/09/06 - 14:10:57 | 401 |      17.912µs |  222.*.*.* | HEAD     "/dav/Private/Via/"
[GIN] 2023/09/06 - 14:10:57 | 405 |      73.565µs |  222.*.*.* | HEAD     "/dav/Private/Via/"

就只有这些,其它行和这个问题无关

@devioa
Copy link
Author

devioa commented Sep 6, 2023

试过将上传模式改为快传没有,流上传有概率会出问题

不是网页上传,请看 issue 标题

@foxxorcat
Copy link
Contributor

试过将上传模式改为快传没有,流上传有概率会出问题

不是网页上传,请看 issue 标题

是189pc存储设置里面的上传模式,不是网页的

@devioa
Copy link
Author

devioa commented Sep 6, 2023

试过将上传模式改为快传没有,流上传有概率会出问题

不是网页上传,请看 issue 标题

是189pc存储设置里面的上传模式,不是网页的

刚试了下,改为秒传然后重载存储驱动了,也是一样

@foxxorcat
Copy link
Contributor

你试试网页端能传不,如果也有问题,把出问题的文件大小和后缀发一下,我尝试复现。

@devioa
Copy link
Author

devioa commented Sep 6, 2023

试过将上传模式改为快传没有,流上传有概率会出问题

不是网页上传,请看 issue 标题

是189pc存储设置里面的上传模式,不是网页的

我又试了下其它正常同步的 app,出现了个新的错误failed to close file streamer, close /opt/alist/data/temp/file-410146269: file already closed
QQ截图20230906142428

@devioa
Copy link
Author

devioa commented Sep 6, 2023

你试试网页端能传不,如果也有问题,把出问题的文件大小和后缀发一下,我尝试复现。

网页端是没问题的,我网页端之前传过其它文件是很正常的,但是如果要这个同文件的话我搞不到这个同文件啊,这个是 Via 浏览器 WebDAV 云同步的备份文件

@devioa
Copy link
Author

devioa commented Sep 6, 2023

同步不了的文件名只知道是favorites.txt settings.txt,如果是同名文件的话我试了下也是没问题的
QQ截图20230906143019

@devioa
Copy link
Author

devioa commented Sep 6, 2023

在这两文件传上去后我再试了下云同步,alist 后台没有报错了
但是文件内容没有变化且 Via 仍然提示405状态码
报错和我在 issue 日志里附的那第一张截图是一样的

@xhofe xhofe closed this as completed in d5b68a9 Sep 6, 2023
@xhofe
Copy link
Collaborator

xhofe commented Sep 6, 2023

@foxxorcat
Copy link
Contributor

saladict 是因为本身未对404状态码处理,所以导致弹下载失败错误

@devioa
Copy link
Author

devioa commented Sep 6, 2023

请测试:https://github.com/alist-org/alist/actions/runs/6094691904

同步成功了,问题已解决,非常感谢

@github-actions github-actions bot mentioned this issue Sep 15, 2024
4 tasks
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