ONLYOFFICE 7.3 websocket path changed

Thanks for the new ONLYOFFICE 7.3 and the nice new features.

We just test the new version. We found a issue regarding the proxy configuration.
The path of the websockets seems to be changed so that your example does not match the current situation:

This change also breaks the current reverse proxy configurations that based on your old/current examples.

Is it possible to change this path back to /websocket?
Or have we made a mistake (we use Docker)?

Best regards
Uli

1 Like

There is also a thread about this on GitHub, is the upgrade process that needs to be followed documented anywhere?

1 Like

Same issue, had to rollback to previous documentserver image (using ds on docker with https/http proxy).

Hi @uwohlfeil @Viis @chris,
We are currently investigating the ways to adjust the proxy configuration examples. Sorry for the inconvenience. I will let you know immediately when the fix is ready.

1 Like

BTW we have an update, it seems you can temporarily fix the issue using this example:

Replace the line
ProxyPassMatch /(.*)(\/websocket)$ "ws://${OO_ADDRESS}/$1$2"
with

RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "wss://${OO_ADDRESS}/$1" [P,L]

and check the results.

1 Like

@Carl Thank you for the example. It seems to work.

Why was this adjusted?
I ask this because now all existing installations with reverse proxy must be adjusted.

In 7.3 we changed the websocket library from sockjs to socket.io
https://github.com/ONLYOFFICE/DocumentServer/blob/master/CHANGELOG.md#back-end
That’s why the websocket path looks differently now. We will correct the proxy configuration examples.

1 Like

Hi, do you have the nginx configuration snippet to use for proxy setup?

Hello @zaggynl,
Do you encounter websocket errors when using nginx as a proxy in front of the Document Server?

Yes:

GET wss://office.hostname.tld/7.3.0-184/doc/3101420063/c/?EIO=4&transport=websocket [HTTP/1.1 400 Bad Request 259ms]

Snippet in Nginx I use:

< SSL bit>
< robots bit>
location / {
proxy_pass http://xx.xx.xx.xx:80;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}

You need to add the Upgrade and Connection headers to proxy the websocket connection correctly.

I have just tested nginx proxy using this config upstream docservice { server my-document-server-address;}map $http_host - Pastebin.com (based on https://github.com/ONLYOFFICE/document-server-proxy/blob/master/nginx/proxy-https-to-http.conf) and there were no websocket errors.

Thanks for the reply!

What does $proxy_connection in
proxy_set_header Connection $proxy_connection;
stand for? It is unrecognized on nginx -t check.\

Edit:
Disregard, forgot to add the

        map $http_upgrade $proxy_connection {
          default upgrade;
          "" close;
        }

bit under http level, my nextcloud/onlyoffice is now working again with v7.3!

1 Like

hi @Carl ,the same problem ,but , i useing onlyoffce community install with linux centos ,not docker version ,i has change my docserver local.json ,and set up token inbody:true ,so restart docserver,but open again my html ,receice this message in my broser debug model.


show my docserver err log :

show my nginx conf :

Hello,
Please use the configuration examples given above. Note that they are not for nginx.conf, but for the server blocks that you set up for the Document Server.

OK,thank you answer an question ,this problm has deatail :heart_eyes:

hi ,window version same problem !


What should I do?

Hello @dengtu
Please take a look at example above in this thread. The situation was related to changed websocket connection. So, if you have proxy-server in front of Document server, please use provided examples to resolve the situation.

Uploading documents directly into onlyoffice document server using the example i can display without any issues, but the onlyoffice document server displays document without content from my web application.

The web console for debugging shows below error.

DevTools failed to load source map: Could not load content for https://onlyoffice2-xx.xx.xx/7.5.0-125/web-apps/vendor/socketio/socket.io.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

And also i have verified configuration as per the thread above, and configurations seems to be okay. @Carl what might be issue?

@tsetsiba I guess the .map file is only an effect of the Browser DevTools because ONLYOFFICE does not provide any.

I guess your browser tries to create a Websocket Connection to the ONLYOFFICE Backend but somthing went wrong. Do you check your reverse proxy configuration?

@uwohlfeil thank you for the feedback, “Do you check your reverse proxy configuration?” i have checked configurations for nginx,

  1. /etc/onlyoffice/documentserver/nginx/ds.conf

And i have verified that all required headers are configured. I have installed only office on centos os VM, (Installing ONLYOFFICE Docs for CentOS and derivatives - ONLYOFFICE)

Which reverse proxy configuration i am suppose to check? I am not sure if the above file is the correct file.