Cells behind reverse proxy, collabora is apparently trying to connect wss to local address

Hi Folks,
I have a new install of cells which is working fine behind an nginx reverse proxy on my server cells.robinbussell.co.uk.

The local address that cells is bound to on the server is 192.168.12.1:8080

However I’m now trying to get collabora going and in the browser console I can see that it is trying to connect to wss://192.168.12.1:8080 which, unsurprisingly, is timing out.

browser console log extract:
WebSocket connection to ‘wss://192.168.12.1:8080/lool/https%3A%2F%2Fcells.robinbussell.co.uk%2Fwopi%2Ffiles%2F8078bf3c-b64c-4938-b62e-0a68c19e86b3%3Faccess_token%3DSayTke-ptcAxWjzlVRQAY25jd0wPPVyN7HYDIBC-7Us.jtQJSCoeaJTAmdkd5bhPdFJERe17D71Eae8ltXd5adM%26access_token_ttl%3D0%26permission%3Dedit/ws?WOPISrc=https%3A%2F%2Fcells.robinbussell.co.uk%2Fwopi%2Ffiles%2F8078bf3c-b64c-4938-b62e-0a68c19e86b3&compat=/ws’ failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

loolwsd is also being reverse proxied by nginx and is listening on 127.0.0.1:9980 with plugin settings set to use localhost: 9999

server {
   listen 9999 ssl;
   ssl_certificate     /etc/letsencrypt/live/cells.robinbussell.co.uk/fullchain.pem;
   ssl_certificate_key /etc/letsencrypt/live/cells.robinbussell.co.uk/privkey.pem;
   ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
   ssl_ciphers         ALL:HIGH:!aNULL:!MD5;

   location ^~ /loleaflet {
      proxy_pass https://127.0.0.1:9980;
      proxy_set_header Host $http_host;
   }
   error_log /var/log/nginx/CODE-proxy-error.log;
   access_log /var/log/nginx/CODE-proxy-access.log; 


}

Any ideas as to what’s up?

Cheers,
Robin.

Hello and welcome @Zedsquared,

I’m not very familiar with nginx, but it could be that you need to also reverse proxy the websocket,
you might have an idea on what it looks like on the apache2 documentation.

it looks like this on apache:

# Collabora Online
  # ProxyPassMatch "/lool/(.*)ws$" wss://192.168.0.172:9980/lool/*1/ws nocanon

But why would the client be trying to connect to 192.168.12.1? Surely it should be trying to connect to the public IP of the server, which would then proxy the websocket.

This looks more like the websocket connection code issued from cells doesn’t follow the external IP setting properly.

Cheers,
Robin.

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