Help! The DocumentServer web-apps&server websocket failed Invalid frame header

code from
error info

nginx -v
nginx version: nginx/1.21.6

Server startup successful


include /opt/homebrew/etc/nginx/includes/http-common.conf;
server {
  listen [::]:80 default_server;
  server_tokens off;

  set $secure_link_secret EZYiPQiGYxggYgaC4qBr;
  include /opt/homebrew/etc/nginx/includes/ds-*.conf;


upstream docservice {
  server localhost:8000 max_fails=0 fail_timeout=0s;

map $http_host $this_host {
    "" $host;
    default $http_host;

map $http_x_forwarded_proto $the_scheme {
     default $http_x_forwarded_proto;
     "" $scheme;

map $http_x_forwarded_host $the_host {
    default $http_x_forwarded_host;
    "" $this_host;

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

proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


types {
    text/html                                        html htm shtml;
    text/css                                         css;
    text/xml                                         xml;
    image/gif                                        gif;
    image/jpeg                                       jpeg jpg;
    application/javascript                           js;
    application/atom+xml                             atom;
    application/rss+xml                              rss;

    text/mathml                                      mml;
    text/plain                                       txt;
    text/                 jad;
    text/vnd.wap.wml                                 wml;
    text/x-component                                 htc;

    image/avif                                       avif;
    image/png                                        png;
    image/svg+xml                                    svg svgz;
    image/tiff                                       tif tiff;
    image/vnd.wap.wbmp                               wbmp;
    image/webp                                       webp;
    image/x-icon                                     ico;
    image/x-jng                                      jng;
    image/x-ms-bmp                                   bmp;

    font/woff                                        woff;
    font/woff2                                       woff2;

    application/java-archive                         jar war ear;
    application/json                                 json;
    application/mac-binhex40                         hqx;
    application/msword                               doc;
    application/pdf                                  pdf;
    application/postscript                           ps eps ai;
    application/rtf                                  rtf;
    application/                    m3u8;
    application/             kml;
    application/                 kmz;
    application/                         xls;
    application/                    eot;
    application/                    ppt;
    application/      odg;
    application/vnd.oasis.opendocument.presentation  odp;
    application/vnd.oasis.opendocument.spreadsheet   ods;
    application/vnd.oasis.opendocument.text          odt;
    application/vnd.wap.wmlc                         wmlc;
    application/wasm                                 wasm;
    application/x-7z-compressed                      7z;
    application/x-cocoa                              cco;
    application/x-java-archive-diff                  jardiff;
    application/x-java-jnlp-file                     jnlp;
    application/x-makeself                           run;
    application/x-perl                               pl pm;
    application/x-pilot                              prc pdb;
    application/x-rar-compressed                     rar;
    application/x-redhat-package-manager             rpm;
    application/x-sea                                sea;
    application/x-shockwave-flash                    swf;
    application/x-stuffit                            sit;
    application/x-tcl                                tcl tk;
    application/x-x509-ca-cert                       der pem crt;
    application/x-xpinstall                          xpi;
    application/xhtml+xml                            xhtml;
    application/xspf+xml                             xspf;
    application/zip                                  zip;

    application/octet-stream                         bin exe dll;
    application/octet-stream                         deb;
    application/octet-stream                         dmg;
    application/octet-stream                         iso img;
    application/octet-stream                         msi msp msm;

    audio/midi                                       mid midi kar;
    audio/mpeg                                       mp3;
    audio/ogg                                        ogg;
    audio/x-m4a                                      m4a;
    audio/x-realaudio                                ra;

    video/3gpp                                       3gpp 3gp;
    video/mp2t                                       ts;
    video/mp4                                        mp4;
    video/mpeg                                       mpeg mpg;
    video/quicktime                                  mov;
    video/webm                                       webm;
    video/x-flv                                      flv;
    video/x-m4v                                      m4v;
    video/x-mng                                      mng;
    video/x-ms-asf                                   asx asf;
    video/x-ms-wmv                                   wmv;
    video/x-msvideo                                  avi;


location ~ /.well-known/acme-challenge {
  root /var/www/onlyoffice/documentserver/letsencrypt/;
  allow all;


#welcome page
rewrite ^/$ $the_scheme://$the_host/welcome/ redirect;

#support old version
rewrite ^\/OfficeWeb(\/apps\/.*)$ $the_scheme://$the_host/7.2.1-34/web-apps$1 redirect;

#script caching protection
rewrite ^(\/web-apps\/apps\/(?!api\/).*)$ $the_scheme://$the_host/7.2.1-34$1 redirect;

#disable caching for api.js
location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps\/apps\/api\/documents\/api\.js)$ {
  expires -1;
gzip_static on;
  alias  /Users/hufei/workspace/WebProject/banshion-code/DocumentServer/$2;

#suppress logging the unsupported locale error in web-apps
location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps)(\/.*\.json)$ {
  expires 365d;
  error_log /dev/null crit;
gzip_static on;
  alias /Users/hufei/workspace/WebProject/banshion-code/DocumentServer/$2$3;

#suppress logging the unsupported locale error in plugins
location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(sdkjs-plugins)(\/.*\.json)$ {
  expires 365d;
  error_log /dev/null crit;
gzip_static on;
  alias /Users/hufei/workspace/WebProject/banshion-code/DocumentServer/$2$3;

location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps|sdkjs|sdkjs-plugins|fonts)(\/.*)$ {
  expires 365d;
gzip_static on;
  alias /Users/hufei/workspace/WebProject/banshion-code/DocumentServer/$2$3;

location ~* ^(\/cache\/files.*)(\/.*) {
  alias /var/lib/onlyoffice/documentserver/App_Data$1;
  add_header Content-Disposition "attachment; filename*=UTF-8''$arg_filename";

  secure_link $arg_md5,$arg_expires;
  secure_link_md5 "$secure_link_expires$uri$secure_link_secret";

  if ($secure_link = "") {
    return 403;

  if ($secure_link = "0") {
    return 410;

# Allow "/internal" interface only from
# Don't comment out the section below for the security reason!
 location ~* ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(internal)(\/.*)$ {
  deny all;
  proxy_pass http://docservice/$2$3;

# Allow "/info" interface only from by default
# Comment out lines allow; and deny all;
# of below section to turn on the info page
location ~* ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(info)(\/.*)$ {
  deny all;
  proxy_pass http://docservice/$2$3;

location / {
  proxy_pass http://docservice;

location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?(\/doc\/.*) {
  proxy_pass http://docservice$2;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
  proxy_read_timeout 86400;


location /7.2.1-34/ {
  proxy_pass http://docservice/;

location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(dictionaries)(\/.*)$ {
  expires 365d;
  alias /Users/hufei/workspace/WebProject/banshion-code/DocumentServer/$2$3;


## Increase this if you want to upload large attachments
client_max_body_size 100m;

gzip on;
gzip_vary on;
gzip_types  text/plain

access_log off;
error_log /opt/homebrew/etc/nginx/logs/nginx.error.log;

Why do I get this error message? I just downloaded and started and changed the configuration file on the server side and did nothing else. Can you tell me what went wrong

server error message Unsupported protocol version

Tool call server websokcet result

I have solved it because nginx lost eio and transport when forwarding

Now there is a new problem, loading for a long time without response

All the above problems have been solved. why this error occurred? It seems to mean that the spawn function couldn’t find the specified executable, causing an “ENOENT” error

Hello @hufei
Sorry for the late reply. We’re glad you managed the situations. As for your last topic, please provide us with details (step-by-step issue scenario and Document server logs).
Also I have noticed that you use outdated version of Document server (v.7.2.1). the latest one is 7.3.3. If it’s possible, please update your installation and point us to the guide which you used for installation\update processes.

@Alexandre Please tell me how to compile the mac arm version. thanks a lot :pray:

Hello @hufei
Sorry, there’re no compilation guides for MacOS (installation guides in particular). I would recommend to follow official guides and system requirements: Installation Guides - Docs - ONLYOFFICE