owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.4k stars 182 forks source link

Collabora is not available #8474

Closed ScharfViktor closed 6 months ago

ScharfViktor commented 8 months ago

Step:

Actual:

Screenshot 2024-02-16 at 10 16 50 image

app-provider-collabora log:

2024-02-15 21:44:08 {"level":"fatal","service":"app-provider-collabora","error":"Failed to connect to NATS Server: nats: no servers available for connection","time":"2024-02-15T20:44:08Z","message":"Registration error for external service com.owncloud.api.app-provider-collabora"}
2024-02-15 21:44:09 {"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-02-15T20:44:09Z","message":"error starting the grpc server"}

cc @2403905

2403905 commented 8 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

2403905 commented 8 months ago

This is a race condition when the app provider can't talk to nats and can't restart properly.

DeepDiver1975 commented 6 months ago

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?

micbar commented 6 months ago

Please keep open, the mentioned PR should be reverted, we cannot use user:0 in any ocis container.

DeepDiver1975 commented 6 months ago

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