owncloud / ocis

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

request to 'app/list' mostly responds with '500' preventing login #9873

Open individual-it opened 3 months ago

individual-it commented 3 months ago

Describe the bug

After upgrade to 6.2.0 (also tried 6.3.0) I could not login to the webUI. Digging deeper, the problem seemed to be that the app/list endpoint mostly returns 500

{
  "code": "SERVER_ERROR",
  "message": "error listing supported mime types"
}

Steps to reproduce

  1. update to 6.2.0
  2. try to login

Expected behavior

login should work

Actual behavior

app/list endpoint mostly returns 500

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

docker-compose.yml:

```yaml --- services: ocis: image: owncloud/ocis-rolling:6.2.0 networks: ocis-net: ports: - "9200:9200" entrypoint: - /bin/sh command: [ "-c", "ocis server" ] environment: OCIS_URL: https://${OCIS_DOMAIN:-ocis.in-nepal.de} OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-warn} OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}" OCIS_INSECURE: "${INSECURE:-false}" OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD: false PROXY_HTTP_ADDR: 0.0.0.0:9200 PROXY_TLS: false OCIS_CACHE_STORE: "nats-js-kv" #OCIS_CACHE_STORE_NODES: "cache:6379" OCIS_LOG_FILE: /var/log/ocis/ocis.log MICRO_REGISTRY_ADDRESS: 127.0.0.1:9233 GATEWAY_GRPC_ADDR: 0.0.0.0:9142 NATS_NATS_HOST: 0.0.0.0 NATS_NATS_PORT: 9233 OCIS_SERVICE_ACCOUNT_ID: "******" OCIS_SERVICE_ACCOUNT_SECRET: "******" WEB_OPTION_OPEN_LINKS_WITH_DEFAULT_APP: false WEB_UI_CONFIG_FILE: /etc/ocis/web.config.json PROXY_CSP_CONFIG_FILE_LOCATION: /etc/ocis/csp.yaml restart: always volumes: - type: bind source: /mnt/HC_Volume_32687865/ocis-config target: /etc/ocis - type: bind source: /mnt/HC_Volume_32687865/ocis-data target: /var/lib/ocis - type: bind source: /mnt/HC_Volume_32687865/ocis-logs target: /var/log/ocis networks: ocis-net: ```

web.config.json:

```json { "server": "https://ocis.in-nepal.de", "theme": "https://ocis.in-nepal.de/themes/owncloud/theme.json", "openIdConnect": { "metadata_url": "https://ocis.in-nepal.de/.well-known/openid-configuration", "authority": "https://ocis.in-nepal.de", "client_id": "web", "response_type": "code", "scope": "openid profile email" }, "options": { "topCenterNotifications": true, "openLinksWithDefaultApp": false, "sidebar": { "shares": { "showAllOnLoad": true } }, "contextHelpersReadMore": true }, "apps": [ "files", "text-editor", "pdf-viewer", "search", "external", "admin-settings", "ocm", "webfinger" ] } ```

Additional context

log output:


{"level":"error","service":"frontend","pkg":"rhttp","traceid":"11466b3708d16b8c58b48306704c67c8","request-id":"1edc56870acc/PIVWDw5yf9-000014","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 172.20.0.6:9142: i/o timeout\"","time":"2024-08-21T06:41:01Z","message":"error listing supported mime types"}
{"level":"error","service":"frontend","pkg":"rhttp","traceid":"11466b3708d16b8c58b48306704c67c8","host":"127.0.0.1","method":"GET","uri":"/app/list","url":"/list","proto":"HTTP/1.1","status":500,"size":79,"start":"21/Aug/2024:06:41:01 +0000","end":"21/Aug/2024:06:41:01 +0000","time_ns":505857,"time":"2024-08-21T06:41:01Z","message":"http"}
individual-it commented 2 months ago

something must be corrupted with my data, because I can use the same configuration of a fresh data directory, but not on the existing :-(

bagutzu commented 2 months ago

@individual-it I had this exact issue because of the update of collaboration service. Basically you have to change the old wopi gateway to this collaboration service now (the example has changed if you used a helm chart). After this, I had to delete the service-registry bucket in nats and rollout restart all deployments, and everything was back again.

The only issue is that after a couple days it was back so I am pretty sure it's a nasty bug, however, I still don't understand the system well enough to know from where.

individual-it commented 2 months ago

@bagutzu I got rid of collaboration service and all other external apps in the above example and it still would not work. But what you are saying also done the trick for me: deleting the nats folder and now it works. Let see if the issue comes back

streaminganger commented 1 month ago

upgraded from 5.0.8 to 6.x.x and had problems accessing files on web ui with "Resource not found" errors. and I was getting "transport: Error while dialing: dial tcp" error and the "JETSTREAM - JetStream connection closed: Client Closed | service=nats line=github.com/owncloud/ocis/v2/services/nats/pkg/logging/nats.go:45" logspam.

the above work around to delete <ocisdata>/nats fixed it for me.