Skip to content

Improve WebDAV data synchronization compatibility #12961

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

Closed
88250 opened this issue Oct 29, 2024 · 2 comments
Closed

Improve WebDAV data synchronization compatibility #12961

88250 opened this issue Oct 29, 2024 · 2 comments
Assignees
Milestone

Comments

@88250
Copy link
Member

88250 commented Oct 29, 2024

飞牛 WebDAV 同步失败

@88250 88250 self-assigned this Oct 29, 2024
@88250
Copy link
Member Author

88250 commented Oct 29, 2024

虚拟机中安装了飞牛OS fnOS v0.8.21,手动创建了一个文件夹:

image

飞牛 WebDAV 配置:

image

思源配置:

image

可以列出云端目录:

image

同步报错:

E 2024/10/29 23:56:42 webdav.go:89: upload object [siyuan-webdav/siyuan/repo/lock-sync] failed: Write siyuan-webdav/siyuan/repo/lock-sync: 403
E 2024/10/29 23:56:42 sync_lock.go:161: upload lock sync failed: Write siyuan-webdav/siyuan/repo/lock-sync: 403

调试跟进:

创建文件夹时服务端返回 405:

image

后面创建文件时服务端返回 403:

image

猜测可能是因为虚拟机安装时网络走的是宿主机网卡,所以和飞牛 WebDAV 给出的内网网卡不一致,有可能是这个原因导致服务端 WebDAV 鉴权失败。去掉一个网卡重启飞牛后 WebDAV 使用了宿主机网卡:

image

但是继续尝试同步,一样返回如上报错。

尝试手动在飞牛上建立文件夹:

image

然后再同步还是报错,但报错有所变化:

E 2024/10/30 00:41:09 repository.go:1315: sync data repo failed: Write siyuan-webdav/siyuan/repo/objects/0a/32f21410efe4e18a81d60a52a43fbc46152564: 403

继续手动创建文件夹 objects:

image

然后就可以同步成功了:

image

所以最终原因可能还是飞牛 WebDAV 的问题,希望飞牛团队可以帮忙定位一下,谢谢。

@88250 88250 closed this as completed Oct 29, 2024
@88250
Copy link
Member Author

88250 commented Nov 16, 2024

今天安装飞牛OS fnOS v0.8.24 继续调试了下,还是上面的问题,主要是飞牛的 WebDAV 服务不支持递归创建文件夹,就算开启了这个也没有用:

image

下个版本 v3.1.12 思源会进行兼容处理,如果没有所需父文件夹则自动创建。

@88250 88250 added this to the 3.1.12 milestone Nov 16, 2024
@88250 88250 reopened this Nov 16, 2024
@88250 88250 changed the title 飞牛 WebDAV 同步失败 Improve WebDAV data synchronization compatibility Nov 16, 2024
88250 added a commit to siyuan-note/dejavu that referenced this issue Nov 16, 2024

Verified

This commit was signed with the committer’s verified signature.
@88250 88250 closed this as completed Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant