Error contacting the requested application, please use a different one or try again later | Onlyoffice App-Provider reddit / selfhosted ---------------------------------------------------------------------- Jannik3107 · 2023-10-07 14:44 Hello, ​ I tried to set up the OCIS WOPI example to migrate from Nextcloud to OCIS. Unfortunately I encounter an error when I try to access the OnlyOffice App to open a file.I don't know if I'm in the right place here. The error message: ​ 2023-10-06T09:10:11.585939896Z ERR gateway: error calling GetAppProviderClient: 0.0.0.0:9164: service not found | service=gateway pkg=rgrpc traceid=00000000000000000000000000000000 user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.47 from=tcp://192.168.0.2:41816 uri=/cs3.gateway.v1beta1.GatewayAPI/OpenInApp start=06/Oct/2023:09:10:11 +0000 end=06/Oct/2023:09:10:11 +0000 time_ns=101948609 code=Unknown line=github.com/cs3org/reva/v2@v2.16.1- 0.20231004143709-c089e31b8175/internal/grpc/interceptors/log/log.go:69 2023-10-06T09:10:11.586346256Z ERR Error contacting the requested application, please use a different one or try again later | service=frontend pkg=rhttp traceid=00000000000000000000000000000000 request-id=4acafc31-d58e-41bb-8107-8f633748fa60 error=rpc error: code = Unknown desc = gateway: error calling GetAppProviderClient: 0.0.0.0:9164: service not found line=github.com/cs3org/reva/v2@v2.16.1 -0.20231004143709- c089e31b8175/internal/http/services/appprovider/errors.go:63 2023-10-06T09:10:11.586398576Z ERR http | service=frontend pkg=rhttp traceid=00000000000000000000000000000000 host=127.0.0.1 method=POST uri=/app/open?file_id=e148165d-5868-459d-a8df- 58ffd11ea9dc%245bc4ae71-df5e-4042-888e-b360d77211cb%212fe19c87-36cc- 4baa-9e45-4ff48c6bc5ad&lang=de&app_name=OnlyOffice url=/open?file_id=e 148165d-5868-459d-a8df-58ffd11ea9dc%245bc4ae71-df5e-4042-888e- b360d77211cb%212fe19c87-36cc-4baa-9e45- 4ff48c6bc5ad&lang=de&app_name=OnlyOffice proto=HTTP/1.1 status=500 size=134 start=06/Oct/2023:09:10:11 +0000 end=06/Oct/2023:09:10:11 +0000 time_ns=105843213 line=github.com/cs3org/reva/v2@v2.16.1- 0.20231004143709- c089e31b8175/internal/http/interceptors/log/log.go:112 ​ My docker compose setup is: ​ version: "3.7" services: traefik: image: traefik:v2.9.1 networks: ocis-net: aliases: - ${OCIS_DOMAIN:-ocis.owncloud.test} - ${WOPISERVER_DOMAIN:-wopiserver.owncloud.test} - ${COLLABORA_DOMAIN:-collabora.owncloud.test} - ${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test} command: - "--log.level=${TRAEFIK_LOG_LEVEL:-ERROR}" # letsencrypt configuration - "--certificatesResolvers.http.acme.email=${TRAEFIK_ACME_MAIL:- example@example.org}" - "--certificatesResolvers.http.acme.storage=/certs/acme.json" - "-- certificatesResolvers.http.acme.httpChallenge.entryPoint=http" # enable dashboard - "--api.dashboard=true" # define entrypoints - "--entryPoints.http.address=:80" - "--entryPoints.http.http.redirections.entryPoint.to=https" - "--entryPoints.http.http.redirections.entryPoint.scheme=https" - "--entryPoints.https.address=:443" # docker provider (get configuration from container labels) - "--providers.docker.endpoint=unix:///var/run/docker.sock" - "--providers.docker.exposedByDefault=false" # access log - "--accessLog=true" - "--accessLog.format=json" - "--accessLog.fields.headers.names.X-Request-Id=keep" ports: - "59900:80" - "59901:443" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" - "certs:/certs" labels: - "traefik.enable=${TRAEFIK_DASHBOARD:-false}" - "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK _BASIC_AUTH_USERS:-admin:$$apr1$$4vqie50r$$YQAmQdtmz5n9rEALhxJ4l.}" # defaults to admin:admin - "traefik.http.routers.traefik.entrypoints=https" - "traefik.http.routers.traefik.rule=Host(\${TRAEFIK_DOMAIN:- traefik.owncloud.test}`)"` - "traefik.http.routers.traefik.middlewares=traefik-auth" - "traefik.http.routers.traefik.tls.certresolver=http" - "traefik.http.routers.traefik.service=api@internal" logging: driver: "local" restart: always ocis: image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest} networks: ocis-net: entrypoint: - /bin/sh # run ocis init to initialize a configuration file with random secrets # it will fail on subsequent runs, because the config file already exists # therefore we ignore the error and then start the ocis server command: ["-c", "ocis init || true; ocis server"] environment: OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test} OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info} OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}" PROXY_TLS: "false" # do not use SSL between Traefik and oCIS GATEWAY_GRPC_ADDR: 0.0.0.0:9142 # make the REVA gateway accessible to the app drivers # INSECURE: needed if oCIS / Traefik is using self generated certificates OCIS_INSECURE: "${INSECURE:-false}" # basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect) PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}" # admin user password IDM_ADMIN_PASSWORD: "${ADMIN_PASSWORD:-admin}" # this overrides the admin password from the configuration file # demo users IDM_CREATE_DEMO_USERS: "${DEMO_USERS:-false}" # make the registry available to the app provider containers MICRO_REGISTRY: "mdns" volumes: - /opt/ocis/config/ocis/app-registry.yaml:/etc/ocis/app- registry.yaml - ocis-config:/etc/ocis - ocis-data:/var/lib/ocis labels: - "traefik.enable=true" - "traefik.http.routers.ocis.entrypoints=https" - "traefik.http.routers.ocis.rule=Host(\${OCIS_DOMAIN:- ocis.owncloud.test}`)"` - "traefik.http.routers.ocis.tls.certresolver=http" - "traefik.http.routers.ocis.service=ocis" - "traefik.http.services.ocis.loadbalancer.server.port=9200" logging: driver: "local" restart: always ocis-appprovider-onlyoffice: image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest} networks: ocis-net: user: "0" # needed for apk add in entrypoint script entrypoint: - /bin/sh - /entrypoint-override.sh #command: app-provider server environment: # use the internal service name of the gateway REVA_GATEWAY: ocis:9142 APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164 # configure the service name to avoid collision with collabora APP_PROVIDER_SERVICE_NAME: app-provider-onlyoffice # use the internal service name APP_PROVIDER_EXTERNAL_ADDR: ocis-appprovider-onlyoffice:9164 APP_PROVIDER_DRIVER: wopi APP_PROVIDER_WOPI_APP_NAME: OnlyOffice APP_PROVIDER_WOPI_APP_ICON_URI: https://${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}/web- apps/apps/documenteditor/main/resources/img/favicon.ico APP_PROVIDER_WOPI_APP_URL: https://${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test} APP_PROVIDER_WOPI_INSECURE: "${INSECURE:-false}" APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL: https://${WOPISERVER_DOMAIN:-wopiserver.owncloud.test} APP_PROVIDER_WOPI_FOLDER_URL_BASE_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test} # share the registry with the ocis container MICRO_REGISTRY: "mdns" volumes: - /opt/ocis/config/ocis-appprovider-onlyoffice/entrypoint- override.sh:/entrypoint-override.sh - ocis-config:/etc/ocis logging: driver: "local" restart: always wopiserver: image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-v10.1.0} networks: ocis-net: entrypoint: - /bin/sh - /entrypoint-override.sh environment: WOPISERVER_INSECURE: "${INSECURE:-false}" WOPISECRET: ${WOPI_JWT_SECRET:-LoremIpsum567} WOPISERVER_DOMAIN: ${WOPISERVER_DOMAIN:-wopiserver.owncloud.test} volumes: - /opt/ocis/config/wopiserver/entrypoint-override.sh:/entrypoint- override.sh - /opt/ocis/config/wopiserver/wopiserver.conf.dist:/etc/wopi/wopis erver.conf.dist - wopi-recovery:/var/spool/wopirecovery labels: - "traefik.enable=true" - "traefik.http.routers.wopiserver.entrypoints=https" - "traefik.http.routers.wopiserver.rule=Host(\${WOPISERVER_DOMAIN: -wopiserver.owncloud.test}`)"` - "traefik.http.routers.wopiserver.tls.certresolver=http" - "traefik.http.routers.wopiserver.service=wopiserver" - "traefik.http.services.wopiserver.loadbalancer.server.port=8880" logging: driver: "local" restart: always onlyoffice: image: onlyoffice/documentserver:7.3.3 networks: ocis-net: entrypoint: - /bin/sh - /entrypoint-override.sh environment: WOPI_ENABLED: "true" USE_UNAUTHORIZED_STORAGE: "${INSECURE:-false}" # self signed certificates volumes: - /opt/ocis/config/onlyoffice/entrypoint-override.sh:/entrypoint- override.sh - /opt/ocis/config/onlyoffice/local.json:/etc/onlyoffice/documents erver/local.dist.json labels: - "traefik.enable=true" - "traefik.http.routers.onlyoffice.entrypoints=https" - "traefik.http.routers.onlyoffice.rule=Host(\${ONLYOFFICE_DOMAIN: -onlyoffice.owncloud.test}`)"` - "traefik.http.routers.onlyoffice.tls.certresolver=http" - "traefik.http.routers.onlyoffice.service=onlyoffice" - "traefik.http.services.onlyoffice.loadbalancer.server.port=80" # websockets can't be opened when this is ommitted - "traefik.http.middlewares.onlyoffice.headers.customrequestheader s.X-Forwarded-Proto=https" - "traefik.http.routers.onlyoffice.middlewares=onlyoffice" logging: driver: "local" restart: always volumes: certs: ocis-config: ocis-data: wopi-recovery: networks: ocis-net: ​ I dont know why the app-provider could not be found. What am I missing out? ---------------------------------------------------------------------- fyijesuisunchat · 2023-10-09 14:19 There's a couple of things I can spot that are potentially an issue: 1. Your REVA\_GATEWAY and APP\_PROVIDER\_EXTERNAL\_ADDR in the ocis- appprovider-onlyoffice service are different from the owncloud example I think you're referring to; try setting these to com.owncloud.api.gateway and com.owncloud.api.app-provider-onlyoffice respectively. 2. OnlyOffice now requires the JWT secret to work but owncloud's example doesn't do this. Try setting WOPI\_JWT\_SECRET in your .env to a password, and then adding this to the environment section of the onlyoffice service. ​ JWT_ENABLED: "true" JWT_SECRET: "${WOPI_JWT_SECRET}" ---------------------------------------------------------------------- Jannik3107 · 2023-10-09 20:51 Thank you very much! The second one was correct. For the REVA\_GATEWAY and APP\_PROVIDER\_EXTERNAL\_ADDR variables, the docs say to use the names of the services from the docker compose, so I changed them to ocis:9142 and ocis\_appprovider\_onlyoffice:9164 respectively ---------------------------------------------------------------------- fyijesuisunchat · 2023-10-10 00:29 OCIS is a very fiddly deployment to be honest, it could have been anything!