Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

reva produce 404 status code when einstein send a file to marie #22

Closed
mrvahedi68 opened this issue Aug 31, 2022 · 10 comments
Closed

reva produce 404 status code when einstein send a file to marie #22

mrvahedi68 opened this issue Aug 31, 2022 · 10 comments

Comments

@mrvahedi68
Copy link
Contributor

mrvahedi68 commented Aug 31, 2022

We have the current stack as below:
run three instances from one owncloud source with php -S command.
one Reva instance from Reva source code with this config:

[shared]
gatewaysvc = "localhost:19000"

[grpc]
address = "0.0.0.0:19000"

[grpc.services.gateway]
authregistrysvc = "localhost:19000"
appprovidersvc = "localhost:19000"
appregistry = "localhost:19000"
storageregistrysvc = "localhost:19000"
preferencessvc = "localhost:19000"
userprovidersvc = "localhost:19000"
usershareprovidersvc = "localhost:19000"
publicshareprovidersvc = "localhost:19000"
ocmcoresvc = "localhost:19000"
ocmshareprovidersvc = "localhost:19000"
ocminvitemanagersvc = "localhost:19000"
ocmproviderauthorizersvc = "localhost:19000"
datagateway = "http://localhost:19001/data"
transfer_expires = 6 # give it a moment
commit_share_to_storage_grant = true
commit_share_to_storage_ref = true

[grpc.services.authregistry]
driver = "static"

[grpc.services.authregistry.drivers.static.rules]
basic = "localhost:19000"

[grpc.services.storageregistry]
driver = "static"

[grpc.services.storageregistry.drivers.static]
home_provider = "/home"

[grpc.services.storageregistry.drivers.static.rules]
"/home" = {"address" = "localhost:19000"}
"123e4567-e89b-12d3-a456-426655440000" = {"address" = "localhost:19000"}

[grpc.services.usershareprovider]
driver = "memory"

[grpc.services.ocmcore]
driver = "json"

[grpc.services.ocmcore.drivers.json]
file = "/var/tmp/reva/shares_server_1.json"

[grpc.services.ocminvitemanager]
driver = "json"

[grpc.services.ocmshareprovider]
driver = "json"

[grpc.services.ocmshareprovider.drivers.json]
file = "/var/tmp/reva/shares_server_1.json"

[grpc.services.ocmproviderauthorizer]
driver = "json"

[grpc.services.ocmproviderauthorizer.drivers.json]
providers = "/etc/revad/providers.json"

[grpc.services.publicshareprovider]
driver = "memory"

[grpc.services.appregistry]
driver = "static"

[grpc.services.appprovider]
driver = "demo"
app_provider_url = "localhost:19000"

[grpc.services.storageprovider]
driver = "nextcloud"
mount_path = "/home"
mount_id = "123e4567-e89b-12d3-a456-426655440000"
expose_data_server = true
data_server_url = "http://localhost:19001/data"
enable_home_creation = true

[grpc.services.storageprovider.drivers.nextcloud]
endpoint = "http://localhost:8080/index.php/apps/sciencemesh/"
user_layout = "{{.Username}}"
shared_secret="dkuowaueXObvkTqLhxexKkQn7mqzfdHv"

[grpc.services.authprovider]
auth_manager = "nextcloud"

[grpc.services.authprovider.auth_managers.nextcloud]
endpoint = "http://localhost:8080/index.php/apps/sciencemesh/"
shared_secret="dkuowaueXObvkTqLhxexKkQn7mqzfdHv"

[grpc.services.userprovider]
driver = "nextcloud"

[grpc.services.userprovider.drivers.nextcloud]
endpoint = "http://localhost:8080/index.php/apps/sciencemesh/"
shared_secret="dkuowaueXObvkTqLhxexKkQn7mqzfdHv"

[http]
address = "0.0.0.0:19001"

[http.services.dataprovider]
driver = "nextcloud"

[http.services.prometheus]
[http.services.sysinfo]

[http.services.dataprovider.drivers.nextcloud]
endpoint = "http://localhost:8080/index.php/apps/sciencemesh/"

[http.services.ocmd]
prefix = "ocm"

[http.middlewares.providerauthorizer]
driver = "json"

[http.middlewares.providerauthorizer.drivers.json]
providers = "/etc/revad/providers.json"

[http.services.ocs]
prefix = "ocs"

[http.services.ocdav]

[http.services.appprovider]

[http.middlewares.cors]

[grpc.services.ocmcore.drivers.nextcloud]
shared_secret="dkuowaueXObvkTqLhxexKkQn7mqzfdHv"

[grpc.services.ocmshareprovider.drivers.nextcloud]
shared_secret="dkuowaueXObvkTqLhxexKkQn7mqzfdHv"

one MySQL instance.

when einstein shares a file with Marie, Reva receive the share and at the end when wants to call the send API, the logs show error 404.

@mirekys
Copy link

mirekys commented Oct 10, 2022

Hi @mrvahedi68, we noticed the same issue, we are unable to establish a share from NC to OC. A share entry is created in the originating Nextcloud database, but sending the share to the target Reva site (POST to originator's /ocm/send API) silently fails on 404. Nothing ever reaches the target site. The relevant logs from the originating Reva site are:

2022-10-10 12:10:23.109 DBG src/github/cs3org/reva/internal/http/services/ocmd/ocmd.go:113 > http routing head=send pid=1 pkg=rhttp tail=/ traceid=7ee0baf053f4ec09e368bb44b865ab54
2022-10-10 12:10:23.493 ERR src/github/cs3org/reva/internal/http/services/ocmd/send.go:119 > error returned: stat file/folder to share pid=1 pkg=rhttp traceid=7ee0baf053f4ec09e368bb44b865ab54
2022-10-10 12:10:23.493 WRN src/github/cs3org/reva/internal/http/services/ocmd/ocmd.go:132 > request not handled pid=1 pkg=rhttp traceid=7ee0baf053f4ec09e368bb44b865ab54
2022-10-10 12:10:23.493 WRN src/github/cs3org/reva/internal/http/interceptors/log/log.go:112 > http end="10/Oct/2022:12:10:23 +0000" host=10.129.8.2 method=POST pid=1 pkg=rhttp proto=HTTP/1.1 size=0 start="10/Oct/2022:12:10:22 +0000" status=404 time_ns=694459929 traceid=7ee0baf053f4ec09e368bb44b865ab54 uri=/ocm/send url=/ocm/send

maybe @michielbdejong will have some idea on how to debug this?

@michielbdejong
Copy link
Member

I'll have a look next week, thanks!

@labkode
Copy link

labkode commented Oct 17, 2022

@gmgigi96 can you please take a look together with @michielbdejong on this issue?

@michielbdejong michielbdejong moved this from Planned to Todo in Sciencemesh: road to production Oct 17, 2022
@michielbdejong
Copy link
Member

I moved this issue from 'Planned' to 'Todo' in https://github.com/orgs/sciencemesh/projects/14/views/1?layout=board

@michielbdejong michielbdejong moved this from Todo to In Progress in Sciencemesh: road to production Oct 17, 2022
@michielbdejong
Copy link
Member

Moved it from 'Todo' to 'In progress'.
Looks like you're hitting https://github.com/cs3org/reva/blob/v1.19.0/internal/http/services/ocmd/send.go#L119 which means that no resource was found at the Source Path.
Will improve error logging and try to reproduce with latest oc_sciencemesh app.

@michielbdejong
Copy link
Member

michielbdejong commented Oct 17, 2022

Trying to reproduce this using ocm-test-suite and improved reva error messaging, temporarily using mesh.pondersource.org as the development server:

./scripts/clean.sh
./scripts/start-from-Revaoc.sh
./scripts/start-to-Revaoc.sh
./scripts/start-meshdir.sh
./scripts/start-tester-firefox.sh

And then browse to http://mesh.pondersource.org:5800/
-> cs3org/ocm-test-suite#58 -> fixed

@michielbdejong
Copy link
Member

michielbdejong commented Oct 17, 2022

-> cs3org/ocm-test-suite#59 -> fixed
-> cs3org/ocm-test-suite#60 -> fixed

@michielbdejong
Copy link
Member

michielbdejong commented Oct 18, 2022

Next: cs3org/reva#3365 (comment) -> done
Next: #25 -> fixed

@michielbdejong
Copy link
Member

michielbdejong commented Oct 18, 2022

I could not reproduce this. If I set the source path wrong on purpose, with cs3org/reva#3369 I get:

2022-10-18 13:04:48.788 ERR ../../reva/internal/http/services/ocmd/send.go:119 > sourcePath /dunno/home/asdfq/ does not exist on the storage backend pid=6 pkg=rhttp traceid=384b77db8feba7e2c07c4b821f185ac5

so that improved error message should help debug whether it's an incorrect source path that is triggering the 404.

Or maybe you have the iopUrl configured wrong and the 404 is to indicate a missing route on Reva.

@mirekys Let's try to debug this on your server with the additional log messages I added, I'll ping you on Gitter!

@michielbdejong
Copy link
Member

To debug this, we should:

  • check out your owncloud/core to the 'pondersource/reva-sharees-type-6' branch
  • check out your sciencemesh/oc-sciencemesh to the 'pondersource/dev' branch
  • check out your cs3org/reva to the 'cs3org/ocmd-error-messages' branch
  • see if the problem is still happening
  • if so, see what the improved log messages tell us

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

No branches or pull requests

4 participants