Updated Collabora/Nextcloud and now get 404?

I’ve been using Collabora for 6 months without issue and have upgraded in the past.

I have it installed standalone and proxy to it from my proxy server (nginx).

I have it installed using docker, and to upgrade I stopped the container, pulled the latest images and used “docker-compose up -d” as before.

Now when I navigate to a file that would open with Collabora I get Nginx 404, images etc are fine so it isn’t a file system issue.

Log from Nginx:

POST /browser/1e92cc5/cool.html?WOPISrc=https%3A%2F%2Fdomain%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F723_oc783h6z8zko&title=File.xlsx&lang=en-GB&closebutton=1&revisionhistory=1
2 Likes

In my attempt to untangle the clusterf*ck that is Collabora/Office in NC23 I ended up solving your problem (and mine as well).

It turns out that some paths changed in the CODE docker. This helpful documentation helped me figure it out (it’s somehow up to date despite pointing to resources that have disappeared). It gives an example for Apache but you should be able to transpose it to Nginx :

  • the first redirection you have in your reverse-proxy (if you followed just about any tutorial for CODE) should be /browser now, pointing to /browser behind the proxy
  • /lool/(.*)/ws$ pointing to wss://<host>:<post>/lool/$1/ws became /cool/(.*)/ws$ pointing to wss://<host>:<post>/cool/$1/ws
  • /lool/adminws became /cool/adminws, pointing to wss://10.8.1.9:9980/cool/adminws behind the proxy
  • You guessed it, but /lool became /cool and the same happens behind the proxy

After fixing that and shoving the URL to my CODE server in the new “Office Online” administration tab for NC23 (which I assume you’ve done already since you’re getting that error instead of a 504) I can edit again, so I hope this helps.

5 Likes

Hey @Lymkwi yes you are right about the paths, I found the new config (link was broken from docs to collabora by the way), and I’m now running that.

With this my nextcloud install basically hangs, after about 3-4minutes it will load a page but it’s unusable.

I read now that richdocuments 5.0.0 isn’t working, not sure if that’s related to my issue so i installed 4.1.2 but I cannot find “richdocuments” in my app list now, and the issue persists with the page load time.

Any suggestions?

few logs that may be relevant:

GET /hosting/capabilities HTTP/1.1" 499 0 "-" "Nextcloud Server Crawler"

strange thing is with this location block (/hosting/capabilities) removed I can hit this call directly on the LAN and get a repsonse

{"convert-to":{"available":true,"endpoint":"/cool/convert-to"},"hasMobileSupport":true,"hasProxyPrefix":false,"hasTemplateSaveAs":false,"hasTemplateSource":true,"productName":"Collabora Online Development Edition","productVersion":"21.11.0.6","productVersionHash":"1e92cc5"}

Here is my Docker-compose yaml by the way, maybe I need to update something here?

version: '3'
services:
  collabora:
    image: collabora/code
    container_name: collabora
    restart: always
    ports:
      - 9980:9980
    cap_add:
      - MKNOD
    privileged: true
    environment:
      - username=user
      - password=[ass
      - domain=cloud.domain.com
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:welcome.enable=false

I have seen that as well, but 5.0.1 works for me.

Does this happen if you disable the richdocuments app in the application list? If so, does it happen for all pages or just when you try and open a document in Collabora?

You’re probably better off trying to get richdocument working in 5.X rather than try and downgrade it (it didn’t have the same name exactly back then I believe?)

Your docker looks fine, in fact, from the result of /hosting/capabilities that you posted, I can see that we are using the same version exactly. My only difference is that it does indicate a conversion endpoint, but I doubt it’s important.

@Lymkwi I have upgraded to v23 and richdocs to 5.0.1 but I’m still getting it timing out effectively.

I see this in logs:

192.168.1.1 - - [08/Jan/2022:14:20:10 +0000] "GET /hosting/discovery HTTP/1.1" 499 0 "-" "Nextcloud Server Crawler"
192.168.1.1 - - [08/Jan/2022:14:20:10 +0000] "GET /hosting/capabilities HTTP/1.1" 499 0 "-" "Nextcloud Server Crawler"
192.168.1.1 - - [08/Jan/2022:14:20:56 +0000] "GET /hosting/capabilities HTTP/1.1" 499 0 "-" "Nextcloud Server Crawler"
192.168.1.1 - - [08/Jan/2022:14:21:41 +0000] "GET /hosting/capabilities HTTP/1.1" 499 0 "-" "Nextcloud Server Crawler"
192.168.1.1 - - [08/Jan/2022:14:21:41 +0000] "GET /hosting/capabilities HTTP/1.1" 499 0 "-" "Nextcloud Server Crawler"

I had the same problem. I was able to correct the issue by updating the server block for my nginx setup here - https://sdk.collaboraonline.com/docs/installation/Proxy_settings.html

server {
 listen       443 ssl;
 server_name  collaboraonline.example.com;


 ssl_certificate /path/to/certificate;
 ssl_certificate_key /path/to/key;


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


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


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


 # main websocket
 location ~ ^/cool/(.*)/ws$ {
   proxy_pass https://127.0.0.1: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 https://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }


 # Admin Console websocket
 location ^~ /cool/adminws {
   proxy_pass https://127.0.0.1:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }
}
3 Likes

merci - just another case of RTFM :wink: