owncloud / ocis

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

Office Online Server integration error #4253

Closed rtest12 closed 3 weeks ago

rtest12 commented 2 years ago

Sory for the impudence.. I've office online sever 2019 (oos) deployed behind nginx (oos.ex.com for example). I can open oos.ex.com/hosting/discovery page with xml, and oos.ex.com/op/generate.aspx, where i can open office files. I added in my yml this:

  wopiserver:
    image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-latest}
    networks:
      ocis-net:
    entrypoint:
      - /bin/bash
      - /entrypoint-override.sh
    environment:
      WOPISERVER_INSECURE: "${INSECURE:-false}"
      WOPISECRET: ${WOPI_JWT_SECRET:-LoremIpsum567}
      IOPSECRET: ${WOPI_IOP_SECRET:-LoremIpsum123}  #empty value in .env
      WOPISERVER_DOMAIN: ${WOPISERVER_DOMAIN:-wopiserver.owncloud.test}
      COLLABORA_DOMAIN: ${COLLABORA_DOMAIN:-collabora.owncloud.test}
    volumes:
      - ./config/wopiserver/entrypoint-override.sh:/entrypoint-override.sh
      - ./config/wopiserver/wopiserver.conf.dist:/etc/wopi/wopiserver.conf.dist
      - wopi-data:/var/wopi_local_storage
      - wopi-logs:/var/log/wopi
    ports:
      - 8880:8880
    logging:
      driver: "local"
    restart: always

  ocis-appdriver-MSOffice:
    image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
    networks:
      ocis-net:
    command: app-provider server
    environment:
      REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
      APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
      APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-MSOffice:9164
      APP_PROVIDER_DRIVER: wopi
      APP_PROVIDER_WOPI_APP_NAME: MSOffice
      APP_PROVIDER_WOPI_APP_ICON_URI: https://ex.com/favicon.ico
      APP_PROVIDER_WOPI_APP_URL: https://oos.ex.com
      APP_PROVIDER_WOPI_INSECURE: "${INSECURE:-false}"
      APP_PROVIDER_WOPI_WOPI_SERVER_IOP_SECRET: ${WOPI_IOP_SECRET:-LoremIpsum123} #empty value in .env
      APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL: https://wopi.ex.com
    volumes:
      - ocis-config:/etc/ocis
    logging:
      driver: "local"
    restart: always

ocis also behind nginx I changed the app-registry.yaml according to this.

 - mime_type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
    extension: docx
    name: Microsoft Word
    description: Microsoft Word document
    icon: ''
    default_app: MSOffice

Now I get "Error retrieving file information" error, and 500 in console when I try to open a file. There were no problems with the collabora, everything is open there. In docker logs i get

{"level":"error","service":"frontend","pkg":"rhttp","traceid":"00000000000000000000000000000000","error":"error calling OpenInApp: grpc failed with code CODE_INTERNAL","time":"2022-07-20T19:33:34.490502102Z","message":"Remote error, file not found or file is a directory"}
{"level":"error","service":"frontend","pkg":"rhttp","traceid":"00000000000000000000000000000000","host":"127.0.0.1","method":"POST","uri":"/app/open?file_id=1284d238-aa92-42ce-bdc4-0b0000009157$46e1a235-8917-48df-b0f0-c3561639d15c!51876548-9a34-498d-871c-40815e302fb9&app_name=MSOffice","url":"/app/open?file_id=1284d238-aa92-42ce-bdc4-0b0000009157$46e1a235-8917-48df-b0f0-c3561639d15c!51876548-9a34-498d-871c-40815e302fb9&app_name=MSOffice","proto":"HTTP/1.1","status":500,"size":96,"start":"20/Jul/2022:19:33:34 +0000","end":"20/Jul/2022:19:33:34 +0000","time_ns":32842191,"time":"2022-07-20T19:33:34.490652506Z","message":"http"}

I also attach logs from the oos server itself below. SERVER2019-20220720-1358.log

micbar commented 2 years ago

We know that there were problems with Office Online Server on premises but we were never able to solve them.

The log error sounds familiar to me.

@wkloucek Do you have any idea?

rtest12 commented 2 years ago

We know that there were problems with Office Online Server on premises but we were never able to solve them.

The log error sounds familiar to me.

@wkloucek Do you have any idea?

I set everything up from scratch, there is progress, office is starting up, although now errors like "sorry, your session expired" are pouring in, I think this is due to nginx. Until I figured it out.

wkloucek commented 2 years ago

@wkloucek Do you have any idea?

Since Collabora is working fine, I don't know. I know that the cs3org/wopiserver is used with Office Online Server, but I also couldn't set it up properly on my own. I got only Excel working. I stopped investigating because I'm lacking of knowledge and information / resources about the Office Online Server.

wkloucek commented 3 weeks ago

Meanwhile colleges seem to have got it working with oCIS rolling 6.3 and the collaboration service as a replacement for the WOPI server, see also https://github.com/owncloud/ocis/pull/9685