Problmes with Collabora Office in Nexcloud

Hi

I am having some problems with setting up Collabora Office.

Collabora Online server is reachable, however when I try and open a document the document fails to load.

Both my Nextcloud and collabora code server are installed in docker, and I use Nginx Proxy Manager to connect to my nextcloud instance.

I have also setup a subdomain which points to the collabora code server. (office.mydomain.co.uk) which points to my collabora code server ( 10.0.7.50:9980 ).

Below is my Nginux Proxy Setup

 # static files
 location ^~ /browser {
   proxy_pass http://10.0.7.50:9980;
   proxy_set_header Host $http_host;
 }

 # WOPI discovery URL
 location ^~ /hosting/discovery {
   proxy_pass http://10.0.7.50:9980;
   proxy_set_header Host $http_host;
 }

 # Capabilities
 location ^~ /hosting/capabilities {
   proxy_pass http://10.0.7.50:9980;
   proxy_set_header Host $http_host;
 }

 # main websocket
 location ~ ^/cool/(.*)/ws$ {
   proxy_pass http://10.0.7.50:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }

 # download, presentation and image upload
 location ~ ^/(c|l)ool {
   proxy_pass http://10.0.7.50:9980;
   proxy_set_header Host $http_host;
 }

 # Admin Console websocket

 location ^~ /cool/adminws {
   proxy_pass http://10.0.7.50:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }

I’m not sure why its not working, If anyone seems any issues, or recommends any guides it will be appreciated

Thanks in advance

Do you get any error message, if opening a document fails?

Hi Mornsgrans

On checking the collabora online container Log the last update I have is

wsd-00001-00001 2022-02-01 21:14:42.209999 +0000 [ coolwsd ] TRC  Have 1 new children.| wsd/COOLWSD.cpp:4281
wsd-00001-00001 2022-02-01 21:14:42.210057 +0000 [ coolwsd ] INF  WSD initialization complete: setting log-level to
Ready to accept connections on port 9980.

I sometimes get this warning when i restart the container

[warning] as configured.| wsd/COOLWSD.cpp:4297

I don’t seem to get any errors when opening a file in nextcloud.

I used to get some SSL errors when opening files however i added the following line to my containers environment.

extra_params=--o:ssl.enable=false --o:ssl.termination=true

Do you know of any other log files i could check?

I have noticed that they are a few posts on the forum talking about issues with the latest version of Collabora Office & Nextcloud.

I was able to get only-office, without any issues, so i assume the issue is related to the Nextcloud port of Collabora Office.

Ok, So I have going to attempt to get this working again.

I am currently running the latest stable version of Collabora Code & Nextcloud from Docker Hub.

Everything on Collabora Code server seems to be good, (since I can connect to the web GUI using https://office.domain.com.

Collabora Code https://office.domain.com

Nextcloud https://nextcloud.domain.com

When Attempting to open a document I get the following errors (broken down the key parts of the log file

ERR  WOPI::CheckFileInfo failed for URI [https://nextcloud.domain.co.uk/index.php/apps/richdocuments/wopi/files/40000_ocofmgexyy8u?access_token=####access_token_ttl=0&permission=edit]: 403 Forbidden. Headers: 	Server: openresty / 	Date: Tue, 24 May 2022 23:30:39 GMT / 	Content-Type: application/json;
ERR  Unauthorized Request while starting session on https://nextcloud.domain.co.uk:443/index.php/apps/richdocuments/wopi/files/40000_ocofmgexyy8u for socket #31. Terminating connection. Error: Access denied, 403. WOPI::CheckFileInfo failed on: https://nextcloud.domain.co.uk/index.php/apps/richdocuments/wopi/files/40000_ocofmgexyy8u?access_token=####&access_token_ttl=0| wsd/COOLWSD.cpp:4388

my docker compose is. Im not a 100% sure if the aliasgroup1 is correct since the Collabora documentation is not clear.

      - password=!!PASSWORD!!
      - username=!!USERNAME!!
      - aliasgroup1=https://nextcloud.domain.co.uk:443,https://office.domain.co.uk:443
      - APACHE_DISABLE_REWRITE_IP=1
      - TRUSTED_PROXIES=10.0.0.29/16
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true

I assume it has something to do with the aliasgroup1. So if anyone could explain how it should be setup would be great help!

The error message above end with :4388

If I am right, this is the port number to get access to the Collabora server.
So it might be possible, that it will work, after yot set this port in the “aliasgroup1” line. - Maybe another user knows it better than me.

No luck with changing the port.

I just uploaded the whole log to Google Drive
https://drive.google.com/file/d/1WtXLaeW289Nq50Jb8w0_bDgInNIB1PnY/view?usp=sharing

Looking at the log, it looks like its a permissions issue

Terminating connection. Error: Access denied, 403. WOPI::CheckFileInfo failed on: https://nextcloud.domain.co.uk/index.php/apps/richdocuments/wopi/files/

I have also noticed some errors related to /opt/cool

ERR  mknod(/opt/cool/child-roots/MXXNIagVQWJSqXOY//tmp/dev/urandom) failed. Mount must not use nodev flag. (EPERM: Operation not permitted)

Looks like its also having issues to mount files. (I have create a share under “/opt/cool”, though i still get this error.

It looks like they have recently changed the docker setup to use “aliasgroup1”, rather than the original way which was “domain”. This means that almost every guide is out of date.

I dont know if this can help, but take a look at this:

Thanks for your help.

Managed to fix some of the problems, and both containers can see each other.
However looking at the log now the only issues are 403 Access denied errors. It appears that the Collabora Office Server is just rejecting the connection from Nextcloud.

ERR  Failed to add session to [https://office.domain.co.uk:443/index.php/apps/richdocuments/wopi/files/39949_ocofmgexyy8u] with URI [https://nextcloud.domain.co.uk/index.php/apps/richdocuments/wopi/files/39949_ocofmgexyy8u?access_token=01q5RC3jTUleDe0JVEqN1Or539qeFhSz&access_token_ttl=0]: Access denied, 403. WOPI::CheckFileInfo failed on: https://nextcloud.domain.co.uk/index.php/apps/richdocuments/wopi/files/39949_ocofmgexyy8u?access_token=01q5RC3jTUleDe0JVEqN1Or539qeFhSz&access_token_ttl=0| wsd/DocumentBroker.cpp:2117

I assume its this new aliasgroup1 configuration which has replaced the old domain.

The official documentation is a bit confusing.

After Reading it a few times. it looks like the collabora server should go first followed by the servers you want to connect to the server.

Below my my new compose file.

Docker Compose
collabora:
    image: collabora/code
    #container_name: collabora
    restart: always
    command: /start-collabora-online.sh
    environment:
      - password=!!PASSWORD!!
      - username=!!USER!!
      - aliasgroup1=https://office.domain.co.uk:443,https://nextcloud.domain.co.uk:443
      - aliasgroup2=https://nextcloud.domain.co.uk:443,https://office.domain.co.uk:443
      - APACHE_DISABLE_REWRITE_IP=1
      - TRUSTED_PROXIES=10.0.0.29/16
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
    networks:
      - frontend
      - backend

Full Log
https://drive.google.com/file/d/1yFO9IqTkWw5VmanyqoqYYMA-NYQbNdEz/view?usp=sharing