Collabora plugin on Cells

Hi all,

I’m setting up the plugin of Collabora Online, but I’m facing issues in making it work.

Setup on Pydio Cells side:

  • Pydio Cells conteinerized with Docker and behind an Nginx 1.14.1 reverse proxy
  • Collabora Code version: 21 and upper
  • LibreOffice use SSL: yes
  • LibreOffice Host: my-libreoffice-host.mydomain
  • LibreOffice Host Port: 9980

Setup on Collabora server side:

# static files
 location ^~ /browser {
   proxy_pass https://127.0.0.1:9980;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-Proto $scheme;
 }

 location ^~ /browser/dist/cool.html {
   proxy_pass https://127.0.0.1:9980;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-Proto $scheme;
 }

 # WOPI discovery URL
 location ^~ /hosting/discovery {
   proxy_pass https://127.0.0.1:9980;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-Proto $scheme;
 }

 # Capabilities
 location ^~ /hosting/capabilities {
   proxy_pass https://127.0.0.1:9980;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-Proto $scheme;
 }


 # 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 $host;
   proxy_set_header X-Forwarded-Proto $scheme;
   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 $host;
   proxy_set_header X-Forwarded-Proto $scheme;
 }


 # 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 $host;
   proxy_set_header X-Forwarded-Proto $scheme;
   proxy_read_timeout 36000s;
 }

When I try to open a word doc in Pydio Cells, I get a “502 bad gateway” error. So I decided to delete the Host Port configuration data, that is delete 9980 in the Collabora Plugin configuration, despite the fact that the value cannot be empty.
This time I don’t get the 502 error, but nothing happens. Looking at the logs, I see that Cells is asking for this URI:

"GET /browser/dist/cool.html?host=wss://pydiocells.infn.it&WOPISrc=https%3A%2F%2Fpydiocells.infn.it%2Fwopi%2Ffiles%2Ff853eb71-36fe-405d-bfa6-3714d870ea3f&access_token=VTN1sg3pYU2q0cIcIIFyVQMdUPR6pmOrzzZ5vjBX_F0.2dYVuOzHkIyLxiYdjhKOFw_8dLQ19zkJ0_nFXSFl880&permission=edit HTTP/2.0" 200 28128 "https://pydiocells.infn.it/ws-personal-files/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0" "-"

The Nginx reverse proxy on Collabora side gets the request:

 "GET /browser/dist/cool.html?host=wss://pydiocells.infn.it&WOPISrc=https%3A%2F%2Fpydiocells.infn.it%2Fwopi%2Ffiles%2Ff853eb71-36fe-405d-bfa6-3714d870ea3f&access_token=VTN1sg3pYU2q0cIcIIFyVQMdUPR6pmOrzzZ5vjBX_F0.2dYVuOzHkIyLxiYdjhKOFw_8dLQ19zkJ0_nFXSFl880&permission=edit HTTP/1.1" 200 28128 "https://pydiocells.infn.it/ws-personal-files/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0" "10.88.0.1"

Collabora itself gets the request:

 Handling request: /browser/dist/cool.html?host=wss://pydiocells.infn.it&WOPISrc=https%3A%2F%2Fpydiocells.infn.it%2Fwopi%2Ffiles%2Ff853eb71-36fe-405d-bfa6-3714d870ea3f&access_token=VTN1sg3pYU2q0cIcIIFyVQMdUPR6pmOrzzZ5vjBX_F0.2dYVuOzHkIyLxiYdjhKOFw_8dLQ19zkJ0_nFXSFl880&permission=edit| wsd/COOLWSD.cpp:3416

and starts to process it. Still nothing happens on Cells side, and no document is loaded.
If I try to make a request directly from my browser, that is if I put the complete URL on my Chrome/Firefox browser like this:

https://my-libreoffice-host.mydomain/browser/dist/cool.html?host=wss://pydiocells.infn.it&WOPISrc=https%3A%2F%2Fpydiocells.infn.it%2Fwopi%2Ffiles%2Ff853eb71-36fe-405d-bfa6-3714d870ea3f&access_token=VTN1sg3pYU2q0cIcIIFyVQMdUPR6pmOrzzZ5vjBX_F0.2dYVuOzHkIyLxiYdjhKOFw_8dLQ19zkJ0_nFXSFl880&permission=edit

it works and I can see and edit the document.

The only thing I can get from Collabora logs is this error, while it is processing the request from Cells:

 [ websrv_poll ] ERR  #30 Exception while processing incoming request: [GET /cool/https%3A%2F%2Fpydiocells.infn.it%2Fwopi%2Ffiles%2Ff853eb71-36fe-405d-bfa6-3714d870ea3f%3Faccess_token%3DVTN1sg3pYU2q0cIcIIFyVQMdUPR6pmOrzzZ5vjBX_F0.2dYVuOzHkIyLxiYdjhKOFw_8dLQ19zkJ0_nFXSFl880%26access_token_ttl%3D0/ws?WOPISrc=https%3A%2F%2Fpydiocells.infn.it%2Fwopi%2Ffiles%2Ff853eb71-36fe-405d-bfa6-3714d870ea3f&compat=/ws HTTP/1.0^M...]: Invalid or unknown request.| wsd/COOLWSD.cpp:3570

Note that I don’t have this error when asking the URL directly from my browser and not passing through Cells. Given this behaviour, I’m sort of thinking that the issue is on Cells side and not on Collabora one.

Any help is appreciated.

Regards,

Marco Corvo

Try to add above section into nginx config of cells
(

)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.