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

Error 500 when using rclone with ocis #2767

Closed
nikslor opened this issue Nov 15, 2021 · 7 comments · Fixed by cs3org/reva#2293
Closed

Error 500 when using rclone with ocis #2767

nikslor opened this issue Nov 15, 2021 · 7 comments · Fixed by cs3org/reva#2293
Assignees
Labels

Comments

@nikslor
Copy link

nikslor commented Nov 15, 2021

Describe the bug

I run into an issue when trying to sync my home dir to ocis (1.14) using rclone (1.57). On the server side I see messages like the following:

{"level":"info","service":"proxy","proto":"HTTP/1.1","request":"tresor/DHWsnXT5RS-014246","remote-addr":"192.168.88.254:41014","method":"MKCOL","status":500,"path":"/remote.php/webdav/dir1/dir2/","duration":24.023562,"bytes":0,"time":"2021-11-15T08:24:47Z","message":"access-log"}

On the client side:

2021/11/15 09:24:44 DEBUG : dir1/dir2/dir3/testfile.txt: Received error: Update mkParentDir failed: 500 Internal Server Error - low level retry 1/2

Steps to reproduce

It seems, that the problem occurs due to the fact that I have folders only containing one other folder, it should therefore be easy to reproduce my issue with the following commands:

  1. Create the following folder structure on your client:
    1.1 $ mkdir -p rclone_test/dir1/dir2/dir3
    1.2 $ touch rclone_test/dir1/dir2/dir3/testfile.txt

  2. use rclone to sync this folder structure to ocis:
    2.1 $ rclone -vvv --no-check-certificate --low-level-retries 2 sync /tmp/oc/rclone_test storage:

Expected behavior

ocis should not throw a HTTP 500 error in such a case

Actual behavior

IT seems, that ocis throws a HTTP 500 error in such a case

Setup

I did setcap 'cap_net_bind_service=+ep' ocis and run ocis like this:

OCIS_BASE_DATA_PATH=/var/lib/ocis ACCOUNTS_DEMO_USERS_AND_GROUPS=false PROXY_HTTP_ADDR=0.0.0.0:443 OCIS_URL=https://storage.0x17.ch PROXY_TRANSPORT_TLS_KEY=./certs/privkey.pem PROXY_TRANSPORT_TLS_CERT=./certs/cert.pem ./ocis server
@wkloucek
Copy link
Contributor

2.1 $ rclone -vvv --no-check-certificate --low-level-retries 2 sync /tmp/oc/rclone_test storage:

storage: is the oCIS Webdav API?

@wkloucek wkloucek self-assigned this Nov 16, 2021
@nikslor
Copy link
Author

nikslor commented Nov 16, 2021

Hi @wkloucek yes storage: points to https://storage.0x17.ch/remote.php/webdav/

Does this help? Do you need more information?

@wkloucek
Copy link
Contributor

Hi @wkloucek yes storage: points to https://storage.0x17.ch/remote.php/webdav/

Does this help? Do you need more information?

I created a PR to document the Rclone usage with oCIS #2785.

And what you describe is indeed a bug that I could reproduce.

Test folder I tried to sync with Rclone:

$ tree /tmp/rclone-test 
/tmp/rclone-test
└── dir1
    └── dir2
        └── dir3
            └── test.txt

3 directories, 1 file

Rclone WebDAV remote set up with OIDC according to #2785, then I run this Rclone command:

$ rclone sync :local:/tmp/rclone-test :webdav:/rclone-test

It doesn't yield any output, but oCIS does:

oCIS log:

ocis-ocis-1  | {"level":"error","service":"storage","pkg":"rgrpc","error":"Decomposedfs: error getting parent : Decomposedfs: root has no parent","time":"2021-11-17T14:07:56Z","caller":"/go/pkg/mod/github.com/cs3org/reva@v1.15.1-0.20211110160042-a6eb9d5a7cd2/internal/grpc/services/storageprovider/storageprovider.go:534","message":"error creating container: path:\"/home/rclone-test/dir1\" "}
ocis-ocis-1  | {"level":"error","service":"storage","pkg":"rhttp","path":"/home/rclone-test/dir1","status":{"code":15,"message":"error creating container: path:\"/home/rclone-test/dir1\" ","trace":"3d4bf5ce02cb35acc6aa22285a85b73e"},"time":"2021-11-17T14:07:56Z","message":"grpc request failed"}
ocis-ocis-1  | {"level":"error","service":"storage","pkg":"rhttp","host":"127.0.0.1","method":"MKCOL","uri":"/remote.php/webdav/rclone-test/dir1/","url":"/remote.php/webdav/rclone-test/dir1/","proto":"HTTP/1.1","status":500,"size":0,"start":"17/Nov/2021:14:07:56 +0000","end":"17/Nov/2021:14:07:56 +0000","time_ns":6637535,"time":"2021-11-17T14:07:56Z","message":"http"}

@wkloucek
Copy link
Contributor

@nikslor this fix will land on oCIS latest in the next few days (and maybe also in the oCIS 1.15.0 release)

@nikslor
Copy link
Author

nikslor commented Nov 19, 2021

Awesome work @wkloucek - thanks so much for looking into this and being that responsive!
I'm more than happy to test a new build and let you know the result.

Great work, thanks a lot!

@wkloucek
Copy link
Contributor

Fix is on latest master of oCIS and will therefore be part of the 1.15.0 release. Docs are merged, too. So if you want to look into Rclone with OpenID Connect Authentication ;-) -> https://owncloud.dev/clients/rclone/

@nikslor
Copy link
Author

nikslor commented Nov 25, 2021

Just confirming, that 1.15.0 works flawlessly with rclone; thanks a lot @wkloucek!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants