Cloud Computing Insider Awards 2022: Vote for ONLYOFFICE
Vote for ONLYOFFICE

Workspace is offline after update to onlyoffice-communityserver 11.6.0.1620

I´ve got a deb workspace installation on Ubuntu 20.04.4 LTS. The server is a virtual kvm machine. The installation was reachable by https with letsencrypt certificate. After update to onlyoffice-communityserver version 11.6.0.1620 the webgui is no longer reachable. Nginx service is running. When the server is rebooted there is an error 502 app crash webpage for some seconds. Afterwards I get only ERR_INVALID_RESPONSE. Is there any advice? What can I do now to get it reachable again without loosing the workspace data?

Additional Information: the workspace was installed by usinig minmal Ubuntu installation and running sudo bash workspace-install.sh -ims false
The installation was no problem but I don´t know how to solve the current problem.

Hello Holger,
Please send me the config file /etc/nginx/sites-available/onlyoffice
Also please check if monoserve is running: service monoserve status
If it is down, restart it.

Hallo Carl, thx for advice.

Status of Monoserve is active.

root@work:~# service monoserve status
● monoserve.service - FastCGI Mono server
     Loaded: loaded (/lib/systemd/system/monoserve.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-05-04 12:11:41 CEST; 701ms ago
    Process: 1893743 ExecStartPre=/bin/bash -c test -e /var/run/onlyoffice || install -m 755 -o onlyoffice -g nginx -d /var/run/onlyoffice; rm -f /var/run/onlyoffice/onlyoffice.socket /var/www/onlyoffice/WebStudio/mono_crash* /var/www/onlyoffice/WebStudio/core.*; (code=exit>
   Main PID: 1893745 (mono)
      Tasks: 3 (limit: 7060)
     Memory: 13.1M
     CGroup: /system.slice/monoserve.service
             └─1893745 /usr/bin/mono /usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe /config=/etc/hyperfastcgi/onlyoffice /logfile=/var/log/onlyoffice/onlyoffice.log /loglevels=Error

Mai 04 12:11:41 work systemd[1]: Starting FastCGI Mono server...
Mai 04 12:11:41 work systemd[1]: Started FastCGI Mono server.
lines 1-12/12 (END)


Here is the content of sites-available/onlyoffice:

upstream fastcgi_backend_apisystem {
        server unix:/var/run/onlyoffice/onlyofficeApiSystem.socket;
        keepalive 32;
}

upstream fastcgi_backend {
	server unix:/var/run/onlyoffice/onlyoffice.socket;
	keepalive 32;
}

fastcgi_cache_path /var/cache/nginx/onlyoffice
	levels=1:2
	keys_zone=onlyoffice:256m
	max_size=1024m
	inactive=1d;

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 $request_uri $header_access_control_allow_origin {
  ~*^/(api\/2.0|products\/crm\/httphandlers\/webtoleadfromhandler.ashx|products\/files\/httphandlers\/filehandler.ashx|products\/files\/chunkeduploader.ashx|thirdparty\/plugin) "*";
  default "";
}

map $request_uri $header_x_frame_options {
  ~*^/(favicon\.ico|products\/files\/share\.aspx|products\/files\/saveas\.aspx|products\/files\/filechoice\.aspx|products\/files\/doceditor\.aspx|thirdparty\/plugin) "";
  ~*^/ds-vpath "SAMEORIGIN";
  default "SAMEORIGIN";
}
	
server {
	listen 80;

	charset utf-8;

    add_header Access-Control-Allow-Origin $header_access_control_allow_origin;
    add_header X-Frame-Options $header_x_frame_options;

	large_client_header_buffers 4 16k;

        set $X_REWRITER_URL $the_scheme://$the_host;

        if ($http_x_rewriter_url != '') {
                set $X_REWRITER_URL $http_x_rewriter_url ;
        }
        
	include /etc/nginx/includes/onlyoffice-communityserver-*.conf;
}	

Thank you.

Please specify how you installed the update? Did you use the installation script?

It seems the nginx config was overwritten as there is no listen 443 section that is responsible for HTTPS connection.
Please follow the guide to re-enable HTTPS:
https://helpcenter.onlyoffice.com/installation/groups-https-linux.aspx

Hello Carl,

the update was installed via

apt update
apt upgrade

Is that not the recommended way for updating?

I followed the linked guide and added to sites-available/onlyoffice:

server {
        listen 0.0.0.0:443 ssl http2;
        listen [::]:443 ssl http2 default_server;

        charset utf-8;

        server_tokens off;

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

        ssl_certificate /var/www/onlyoffice/Data/certs/onlyoffice.crt;
        ssl_certificate_key /var/www/onlyoffice/Data/certs/onlyoffice.key;
        ssl_verify_client off;
        ssl_client_certificate www/onlyoffice/Data/certs/onlyoffice.crt;
        ssl_session_timeout 1d;
        ssl_session_cache shared:MozSSL:10m;  # about 40000 sessions
        ssl_session_tickets off;
        ssl_protocols TLSv1.2;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
        ssl_prefer_server_ciphers off;
        add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
        add_header X-Frame-Options $header_x_frame_options;
        add_header X-Content-Type-Options nosniff;
        add_header Access-Control-Allow-Origin $header_access_control_allow_origin;

        ssl_stapling on;
        ssl_stapling_verify on;
        ssl_trusted_certificate /var/www/onlyoffice/Data/certs/stapling.trusted.crt;
        resolver 8.8.8.8 8.8.4.4 127.0.0.11 valid=300s; # Can change to your DNS resolver if desired
        resolver_timeout 10s;

        ssl_dhparam /var/www/onlyoffice/Data/certs/dhparam.pem;

        large_client_header_buffers 4 16k;

        set $X_REWRITER_URL $the_scheme://$the_host;

        if ($http_x_rewriter_url != '') {
                set $X_REWRITER_URL $http_x_rewriter_url ;
        }

        include /etc/nginx/includes/onlyoffice-communityserver-*.conf;
}

That did unfortunately not solve my problem nor running the script:

sudo bash /var/www/onlyoffice/Tools/default-onlyoffice-ssl.sh

I rebooted the server for restarting all services but the Webgui is still not reachable. For a short time the webserver shows a webpage with “Error 502. App Crash”.

The recommended way of updating a deb/rpm package installation of Workspace is by using the installation script.

bash workspace-install.sh -u true

Please try executing it and let me know the results.

I executed the script and rebooted the server. But again I get “Error 502. App Crash”.

Please check monoserve status again.

Status of monoserve is up and running.

● monoserve.service - FastCGI Mono server
     Loaded: loaded (/lib/systemd/system/monoserve.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-05-04 14:59:03 CEST; 37s ago
    Process: 3822 ExecStartPre=/bin/bash -c test -e /var/run/onlyoffice || install -m 755 -o onlyoffice -g nginx -d /var/run/onlyoffice; rm -f /var/run/onlyoffice/onlyoffice.socket /var/www/onlyoffice/WebStudio/mono_crash* /var/www/onlyoffice/WebStudio/core.*; (code=exited,>
   Main PID: 3829 (mono)
      Tasks: 52 (limit: 7060)
     Memory: 217.1M
     CGroup: /system.slice/monoserve.service
             └─3829 /usr/bin/mono /usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe /config=/etc/hyperfastcgi/onlyoffice /logfile=/var/log/onlyoffice/onlyoffice.log /loglevels=Error

Mai 04 14:59:03 work systemd[1]: Starting FastCGI Mono server...
Mai 04 14:59:03 work systemd[1]: Started FastCGI Mono server.
Mai 04 14:59:04 work hyperfastcgi4[3829]: WebConfigurationManager's LRUcache Size overriden to: 2000 (via MONO_ASPNET_WEBCONFIG_CACHESIZE)
Mai 04 14:59:44 work systemd[1]: Stopping FastCGI Mono server...
Mai 04 14:59:44 work hyperfastcgi4[3829]: host-list.c:38: register_host():        (null):0:/:/var/www/onlyoffice/WebStudio host=0x7f63d84c6320 pinned_host=0x7f63d84c6320 domain=0x55753c53e080
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:476: Listen():        libevent version: 2.1.11-stable
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:490: Listen():        libevent is using epoll for events.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 15.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 15.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 15.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 15.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 15.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 38.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:319: cmd_error():        Remote host disconnected from fd 42.
Mai 04 14:59:44 work hyperfastcgi4[3829]: libev.c:447: Shutdown():        Goodbye.
Mai 04 14:59:44 work systemd[1]: monoserve.service: Succeeded.
Mai 04 14:59:44 work systemd[1]: Stopped FastCGI Mono server.
Mai 04 14:59:44 work systemd[1]: Starting FastCGI Mono server...
Mai 04 14:59:44 work systemd[1]: Started FastCGI Mono server.

Send me all logs from /var/log/onlyoffice/

There are many log files in that folder. Can I send a tar archive file via pm? Which adress shall I use?

Yes, you can upload an archive with logs to some hosting and send me the link via pm.

OK - now I found the “Start a message” button.

Hi. Did you find the root cause here. Im sesing something similar
nlyoffice hyperfastcgi4[2302]: libev.c:319: cmd_error():#011Remote host disconnected from fd 42

Hi! The problem in my case was, that the communityserver deb-package was not compatible to some actual ubuntu packages (e.g. mysql server, elastic search). Carls advice was, to downgrade this packages. But on actual Ubuntu Version there is no way to downgrade these packages.

So I did a clean reinstall of Ubuntu OS and did a new Communityserver Installation with “sudo bash workspace-install.sh -ims false” and I fond the same problem. I was unable to install a fresh and working installation of Communityserver on Ubuntu OS. After some month a new version 12 of onlyoffice-communityserver was offered.

And for some weeks it installs and runs like a charm. Then Ubuntu offered a new version of mysqlserver and the problem repeated. It seems like installation and update of communityserver is only possible after release of a new version and only for a short period of time. Therefore I installed my Ubuntuserver on BTRFS Filesystem and now I do daily snapshots. And I do a filesystem snapshot each time I try to update any packages. With a actual snapshot I can try to update the installed communityserver with “sudo bash workspace-install.sh -u true”.

If the update destroys my installation, I restore the last snapshot and my old version is up and running again. In most cases I have to restore the snapshot. It seems to be a principal problem when installing communityserver with deb packages. Perhaps you should better not do a deb packages installation and better preferr the docker image installation.

Best regards, Holger

Thats great news Holger. I tend to backup before upgrade too, in case of issues. I have a slew of pending updates on my ububtu 22 OO install, so I’ll wait .

root@onlyoffice:~# apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages have been kept back:
elasticsearch fwupd onlyoffice-communityserver
The following packages will be upgraded:
aspnetcore-runtime-6.0 aspnetcore-targeting-pack-6.0 base-files dotnet-apphost-pack-6.0 dotnet-host dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-runtime-deps-6.0
dotnet-sdk-6.0 dotnet-targeting-pack-6.0 libnetplan0 libtss2-esys0 linux-firmware motd-news-config mysql-client mysql-common mysql-community-client
mysql-community-client-core mysql-community-client-plugins mysql-community-server mysql-community-server-core mysql-server netplan.io onlyoffice-controlpanel
onlyoffice-xmppserver python-apt-common python3-apt python3-distupgrade ubuntu-advantage-tools ubuntu-release-upgrader-core vim vim-common vim-runtime vim-tiny xxd
35 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
5 standard security updates
Need to get 297 MB of archives.
After this operation, 4,854 kB of additional disk space will be used.
Do you want to continue? [Y/n]

dpkg --list|egrep -i “office|elastic|mysql”|awk ‘{print $2, $3}’
elasticsearch 7.10.0
mysql-apt-config 0.8.22-1
mysql-client 8.0.29-1ubuntu20.04
mysql-common 8.0.29-1ubuntu20.04
mysql-community-client 8.0.29-1ubuntu20.04
mysql-community-client-core 8.0.29-1ubuntu20.04
mysql-community-client-plugins 8.0.29-1ubuntu20.04
mysql-community-server 8.0.29-1ubuntu20.04
mysql-community-server-core 8.0.29-1ubuntu20.04
mysql-server 8.0.29-1ubuntu20.04
onlyoffice-communityserver 12.0.0.1726
onlyoffice-controlpanel 3.1.0.460
onlyoffice-documentserver 7.1.1-23
onlyoffice-xmppserver 12.0.0.116

Oh its ubuntu 20 LTS
NOT 22 :slight_smile: