Closed ScharfViktor closed 6 months ago
The collabora discovery endpoint is not reachable from the ocis-appprovider-collabora
docker container
~ $ curl --show-error --fail http://collabora/hosting/discovery -vk
* Host collabora:80 was resolved.
* IPv6: (none)
* IPv4: 172.26.0.5
* Trying 172.26.0.5:80...
* connect to 172.26.0.5 port 80 from 172.26.0.7 port 49054 failed: Connection refused
* Failed to connect to collabora port 80 after 3 ms: Couldn't connect to server
* Closing connection
curl: (7) Failed to connect to collabora port 80 after 3 ms: Couldn't connect to server
But on the host machine is works well curl -vk https://collabora.owncloud.test/hosting/discovery
This is a race condition when the app provider can't talk to nats and can't restart properly.
In case the app provider cannot read the discovery endpoint the process will terminate and restart - see this log:
ocis-appprovider-collabora-1 | {"level":"error","service":"app-provider-collabora","error":"unable to register services: rgrpc: grpc service appprovider could not be started,: Application server at https://collabora.owncloud.test does not match this AppProvider for Collabora","time":"2024-04-25T13:29:21Z","line":"github.com/cs3org/reva/v2@v2.19.2-0.20240422150349-51ab7655f858/cmd/revad/runtime/runtime.go:206","message":"error starting the grpc server"}
ocis-appprovider-collabora-1 | {"level":"info","service":"app-provider-collabora","pkg":"grace","time":"2024-04-25T13:29:21Z","line":"github.com/cs3org/reva/v2@v2.19.2-0.20240422150349-51ab7655f858/cmd/revad/internal/grace/grace.go:95","message":"pid file \"/tmp/revad-app-provider-collabora-26355e27-df5a-49d7-b168-8d2ecfa794ac.pid\" got removed"}
ocis-appprovider-collabora-1 | {"level":"info","service":"app-provider-collabora","time":"2024-04-25T13:29:23Z","line":"github.com/owncloud/ocis/v2/ocis-pkg/registry/register.go:17","message":"registering external service com.owncloud.api.app-provider-collabora-53f5fb34-0dda-409c-98a9-7de0181c74e5@172.28.0.11:9164"}
ocis-appprovider-collabora-1 | {"level":"info","service":"app-provider-collabora","time":"2024-04-25T13:29:23Z","line":"github.com/cs3org/reva/v2@v2.19.2-0.20240422150349-51ab7655f858/cmd/revad/runtime/runtime.go:85","message":"host info: 6a4ed02f5627"}
ocis-appprovider-collabora-1 | {"level":"info","service":"app-provider-collabora","time":"2024-04-25T13:29:23Z","line":"github.com/cs3org/reva/v2@v2.19.2-0.20240422150349-51ab7655f858/cmd/revad/runtime/runtime.go:178","message":"running on 4 cpus"}
Unless I miss anything in the next startup cycle reading the discovery url is successful and everything should work as design - but it doesn't .... why?
Please keep open, the mentioned PR should be reverted, we cannot use user:0 in any ocis container.
I tried to play around with a wait-for-it container - but this did not yet work out ... https://github.com/owncloud/ocis/compare/feat/docker-wait-for?expand=1
Step:
Actual:
app-provider-collabora log:
cc @2403905