Hi all,
sorry for the literature, I have tried to provide as much information as possible.
Please describe what you are doing to trigger the bug:
Trying to set up duplicacy webdav respository through rclone webdav sharing.
In order to do so, I have configured a remote storage (oneDrive, openDrive, JottaCloud, does not matter) and I am sharing it through rclone serve webdav . I can access through davfs to the share and create files and folders however if I try to set up a repository with webdav support within duplicacy, it fails with the error:
ERROR STORAGE_CREATE Failed to load the WebDAV storage at webdav://iguana@localhost/test: Storage path test/ does not exist
Please describe what you expect to happen (but doesn’t):
being able to create and access a webdav repository served though rclone serve webdav like any other webdav access.
Please describe what actually happens (the wrong behaviour):
Example of access through webdav.
Setup:
rclone side (htpasswd file contains username and pass, rootCA keys are added to the trusted root CA certs within the system and Duplicacy seems to accept the rootCA correctly). For any other interested in… Auto generated certs for localhost and include your rootCA locally
Webdav serve:
# /usr/bin/rclone serve webdav oneDrive:/Duplicacy/dataReady64/ --addr localhost:443 --htpasswd /root/certs/htpasswd --cert /root/certs/rootCA.pem --key /root/certs/rootCA.key -v -v
Access through davfs.
# mount.davfs https://127.0.0.1:443/ /mnt/temporal
Please enter the username to authenticate with server
https://127.0.0.1:443/ or hit enter for none.
Username: username
Please enter the password to authenticate user iguana with server
https://127.0.0.1:443/ or hit enter for none.
Password:
# ls /mnt/temporal
lost+found test
# mkdir /mnt/temporal/deleteme
# ls /mnt/temporal
deleteme lost+found test
However, using duplicacy with webdav on the same service:
duplicacy -d -v -v -v -log init -e -c 8M -max 16M -min 4M dataDroid webdav://iguana@localhost/test
2019-02-21 11:12:30.460 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_WEBDAV_PASSWORD
2019-02-21 11:12:31.016 ERROR STORAGE_CREATE Failed to load the WebDAV storage at webdav://iguana@localhost/test: Storage path test/ does not exist
In the rclone debug side everything looks fine with davfs (i.e listing files and creating a folder deleteme)
2019/02/21 11:57:24 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2019/02/21 11:57:27 INFO : One drive root 'Duplicacy/dataReady64': poll-interval is not supported by this remote
2019/02/21 11:57:27 DEBUG : Adding path "vfs/forget" to remote control registry
2019/02/21 11:57:27 DEBUG : Adding path "vfs/refresh" to remote control registry
2019/02/21 11:57:27 DEBUG : Adding path "vfs/poll-interval" to remote control registry
2019/02/21 11:57:27 INFO : Using "/root/certs/htpasswd" as htpasswd storage
2019/02/21 11:57:27 NOTICE: One drive root 'Duplicacy/dataReady64': WebDav Server started on https://127.0.0.1:443/
2019/02/21 11:57:41 INFO : /test/: 127.0.0.1:50648: Basic auth challenge sent
2019/02/21 11:57:41 DEBUG : /test/: Stat:
2019/02/21 11:57:41 DEBUG : /test/: >Stat: fi={FileInfo:test/}, err = <nil>
2019/02/21 11:57:41 INFO : /test/: OPTIONS from 127.0.0.1:50648
2019/02/21 11:57:41 DEBUG : /test/: Stat:
2019/02/21 11:57:41 DEBUG : /test/: >Stat: fi={FileInfo:test/}, err = <nil>
2019/02/21 11:57:41 DEBUG : /test/: OpenFile: flags=0, perm=----------
2019/02/21 11:57:41 DEBUG : /test/: OpenFile: flags=O_RDONLY, perm=----------
2019/02/21 11:57:41 DEBUG : /test/: >OpenFile: fd=test/ (r), err=<nil>
2019/02/21 11:57:41 DEBUG : /test/: >OpenFile: err = <nil>
2019/02/21 11:57:41 DEBUG : /test/: OpenFile: flags=0, perm=----------
2019/02/21 11:57:41 DEBUG : /test/: OpenFile: flags=O_RDONLY, perm=----------
2019/02/21 11:57:41 DEBUG : /test/: >OpenFile: fd=test/ (r), err=<nil>
2019/02/21 11:57:41 DEBUG : /test/: >OpenFile: err = <nil>
2019/02/21 11:57:42 INFO : /test/: PROPFIND from 127.0.0.1:50648
2019/02/21 11:57:42 DEBUG : /test/: Stat:
2019/02/21 11:57:42 DEBUG : /test/: >Stat: fi={FileInfo:test/}, err = <nil>
2019/02/21 11:57:42 DEBUG : /test/: OpenFile: flags=0, perm=----------
2019/02/21 11:57:42 DEBUG : /test/: OpenFile: flags=O_RDONLY, perm=----------
2019/02/21 11:57:42 DEBUG : /test/: >OpenFile: fd=test/ (r), err=<nil>
2019/02/21 11:57:42 DEBUG : /test/: >OpenFile: err = <nil>
2019/02/21 11:57:42 INFO : /test/: PROPFIND from 127.0.0.1:50648
2019/02/21 11:57:51 DEBUG : /test/: Stat:
2019/02/21 11:57:51 DEBUG : /test/: >Stat: fi={FileInfo:test/}, err = <nil>
2019/02/21 11:57:51 DEBUG : /test/: OpenFile: flags=0, perm=----------
2019/02/21 11:57:51 DEBUG : /test/: OpenFile: flags=O_RDONLY, perm=----------
2019/02/21 11:57:51 DEBUG : /test/: >OpenFile: fd=test/ (r), err=<nil>
2019/02/21 11:57:51 DEBUG : /test/: >OpenFile: err = <nil>
2019/02/21 11:57:51 DEBUG : /test/: OpenFile: flags=0, perm=----------
2019/02/21 11:57:51 DEBUG : /test/: OpenFile: flags=O_RDONLY, perm=----------
2019/02/21 11:57:51 DEBUG : /test/: >OpenFile: fd=test/ (r), err=<nil>
2019/02/21 11:57:51 DEBUG : /test/: >OpenFile: err = <nil>
2019/02/21 11:57:51 INFO : /test/: PROPFIND from 127.0.0.1:50648
2019/02/21 11:57:51 DEBUG : /test/deleteme/: Mkdir: perm=-rwxrwxrwx
2019/02/21 11:57:54 DEBUG : /test/deleteme/: >Mkdir: err = <nil>
2019/02/21 11:57:54 INFO : /test/deleteme/: MKCOL from 127.0.0.1:50648
duplicacy seems to access to with no errors from rclone side…
2019/02/21 11:58:55 DEBUG : /test/: Stat:
2019/02/21 11:58:55 DEBUG : /test/: >Stat: fi={FileInfo:test/}, err = <nil>
2019/02/21 11:58:55 DEBUG : /test/: OpenFile: flags=0, perm=----------
2019/02/21 11:58:55 DEBUG : /test/: OpenFile: flags=O_RDONLY, perm=----------
2019/02/21 11:58:55 DEBUG : /test/: >OpenFile: fd=test/ (r), err=<nil>
2019/02/21 11:58:55 DEBUG : /test/: >OpenFile: err = <nil>
2019/02/21 11:58:55 INFO : /test/: PROPFIND from 127.0.0.1:50698
but it generates the error initializing or accessing any folder…
2019-02-21 12:00:07.253 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_WEBDAV_PASSWORD
2019-02-21 12:00:07.774 ERROR STORAGE_CREATE Failed to load the WebDAV storage at webdav://iguana@localhost/test: Storage path test/ does not exist
If I try to run init from the webdav root folder (/)
duplicacy -d -v -v -v -log init -e -c 8M -max 16M -min 4M dataDroid webdav://iguana@localhost/
It just fail with…
runtime error: index out of range
goroutine 1 [running]:
runtime/debug.Stack(0x22, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0x88
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x18
github.com/gilbertchen/duplicacy/src.CatchLogException()
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_log.go:183 +0x118
panic(0x761580, 0xdd0290)
/usr/local/go/src/runtime/panic.go:502 +0x1f0
github.com/gilbertchen/duplicacy/src.CreateWebDAVStorage(0x7fd2f49df0, 0x9, 0x0, 0x7fd2f49de9, 0x6, 0x442003204a, 0x7, 0x0, 0x0, 0x0, ...)
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_webdavstorage.go:52 +0x4f4
github.com/gilbertchen/duplicacy/src.CreateStorage(0x87c4dd, 0x7, 0x7fd2f49dd6, 0x9, 0x0, 0x0, 0x7fd2f49de0, 0x1a, 0x1, 0x0, ...)
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_storage.go:625 +0x2ce0
main.configRepository(0x44200a30e0, 0x44200a3001)
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/duplicacy/duplicacy_main.go:319 +0x3e4
main.initRepository(0x44200a30e0)
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/duplicacy/duplicacy_main.go:214 +0x28
github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli.Command.Run(0x879957, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8acfe9, 0x4f, 0x0, ...)
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli/command.go:160 +0x5a4
github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli.(*App).Run(0x442026a7e0, 0x442002e100, 0x10, 0x10, 0x0, 0x0)
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli/app.go:179 +0x5a0
main.main()
/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/duplicacy/duplicacy_main.go:2008 +0x4110
Any clue? Any help will be much appreciated. I have include it in Bug, however, maybe is not a bug and it is just my peanut brain who is doing something wrong (I hope not )
I have another webdav setup within rclone for openDrive serving files to duplicacy and I was able to initialize and access the storage correctly.