Coolwsd not working

I’m installing a native package on debian 11 (KVM).

sudo apt install coolwsd code-brand

After installation I will set up

sudo coolconfig set ssl.enable false
sudo coolconfig set ssl.termination true
sudo coolconfig set storage.wopi.host collabora.example.com
sudo coolconfig set-admin-password
sudo systemctl restart coolwsd
systemctl status coolwsd
● coolwsd.service - Collabora Online WebSocket Daemon
     Loaded: loaded (/lib/systemd/system/coolwsd.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-02-07 08:18:48 CET; 35min ago
   Main PID: 3693 (coolwsd)
      Tasks: 7 (limit: 2340)
     Memory: 120.7M
        CPU: 7.129s
     CGroup: /system.slice/coolwsd.service
             ├─3693 /usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd
             ├─3701 /usr/bin/coolforkit --losubpath=lo --systemplate=/opt/cool/systemplate --lotemplate=/opt/collaboraoffice --childroot=/opt/cool/child-roots/ --clientport=9980 --masterport=coolwsd-3B4a4McN --rlimits=limit_virt_mem_mb:0;limit_st>
             └─3703 /usr/bin/coolforkit --losubpath=lo --systemplate=/opt/cool/systemplate --lotemplate=/opt/collaboraoffice --childroot=/opt/cool/child-roots/ --clientport=9980 --masterport=coolwsd-3B4a4McN --rlimits=limit_virt_mem_mb:0;limit_st>

feb 07 08:20:51 collabora coolwsd[3693]: wsd-03693-03716 2022-02-07 08:20:51.677972 +0100 [ admin ] WRN  Ignoring attempted read from 22| ./net/Socket.hpp:1099
feb 07 08:20:52 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:20:52.429447 +0100 [ websrv_poll ] WRN  client - server version mismatch, disabling browser cache. Expected: 739da71| wsd/FileServer.cpp:515
feb 07 08:20:52 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:20:52.583195 +0100 [ websrv_poll ] WRN  client - server version mismatch, disabling browser cache. Expected: 739da71| wsd/FileServer.cpp:515
feb 07 08:20:52 collabora coolwsd[3693]: wsd-03693-03716 2022-02-07 08:20:52.628112 +0100 [ admin ] WRN  Ignoring attempted read from 22| ./net/Socket.hpp:1099
feb 07 08:20:53 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:20:53.048213 +0100 [ websrv_poll ] WRN  client - server version mismatch, disabling browser cache. Expected: 739da71| wsd/FileServer.cpp:515
feb 07 08:20:53 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:20:53.205962 +0100 [ websrv_poll ] WRN  client - server version mismatch, disabling browser cache. Expected: 739da71| wsd/FileServer.cpp:515
feb 07 08:20:53 collabora coolwsd[3693]: wsd-03693-03716 2022-02-07 08:20:53.321434 +0100 [ admin ] WRN  Ignoring attempted read from 22| ./net/Socket.hpp:1099
feb 07 08:20:53 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:20:53.592039 +0100 [ websrv_poll ] WRN  client - server version mismatch, disabling browser cache. Expected: 739da71| wsd/FileServer.cpp:515
feb 07 08:20:53 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:20:53.765403 +0100 [ websrv_poll ] WRN  client - server version mismatch, disabling browser cache. Expected: 739da71| wsd/FileServer.cpp:515
feb 07 08:20:53 collabora coolwsd[3693]: wsd-03693-03716 2022-02-07 08:20:53.835401 +0100 [ admin ] WRN  Ignoring attempted read from 22| ./net/Socket.hpp:1099

When I log in to the admin console, I always see this

I am attaching journalctl

Thanks @gusto for reporting this!

WRN client - server version mismatch, disabling browser cache

It somehow seems to be a cached JS talking to an upgraded WSD… hm could you try in a anonymous window or by clearing the web browser cache and report back

Hi m8 and thank you for the quick reply.
I’ve been trying to solve this problem for a long time.
I first installed coolwsd in unprivileged lxc. Then I tried privileged lxc and finally KVM. I always get the same mistake.
Installation procedure

I tried

  • flush cache
  • anonymous window
  • Mozilla/Chromium …
  • Other divices

http://192.168.1.47:9980/browser/dist/admin/admin.html

I always see

Server has been shut down; Please reload the page

oh this also seems interesting:

ERR  FileServerRequestHandler::NotAuthenticated: No authentication information found| wsd/FileServer.cpp:708
feb 07 08:19:44 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:19:44.430235 +0100 [ websrv_poll ] WRN  client - server version mismatch, disabling browser cache. Expected: 739da71| wsd/FileServer.cpp:515
feb 07 08:19:44 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:19:44.430421 +0100 [ websrv_poll ] ERR  Admin Console wrong username.| wsd/FileServer.cpp:137
feb 07 08:19:44 collabora coolwsd[3693]: wsd-03693-03715 2022-02-07 08:19:44.430466 +0100 [ websrv_poll ] ERR  FileServerRequestHandler::NotAuthenticated: No authentication information found: Invalid admin login| wsd/FileServer.cpp:708

Thank you for the quick reply
How could I solve this?

Sorry, I really do not have any idea, perhaps @bearon or @Ezinne know more (?)

Let’s do it another way.
Let’s say coolwsd I just want to run on a LAN. I do not want to use ssl.
How do I set up /etc/coolwsd/coolwsd.xml?

I’m confused about all the threads, there’s this, and also this:

But I see no symptoms in either topic that in what way CODE isn’t working, or isn’t accessible from Nextcloud.
The admin console isn’t particularly necessary to get it to work. However, the reverse proxy config seems incomplete, if you have one, and the CODE server isn’t accessible from outside, you should set up something similar to what’s described here: Proxy settings — SDK https://sdk.collaboraonline.com/ documentation

I also wrote on the nextcloud forum, but they didn’t advise me. Please read the topic there as well.
I want to integrate collabor online into nextcloud. If I want to integrate it into nextcloud, collabor online must work in LAN.
This is my situation:


I previously installed coolwsd along with nextcloud in 1 LXC.
I have now installed it separately.

If necessary, I will write the exact installation procedure + config files.

Have you checked the reverse proxy configuration I suggested? That’d be necessary. You may have to adapt it a bit if you are going for a terminating or a pure http setup (in the latter case NC has to be on http as well… it really should only be used for testing purposes).

What you could check when troubleshooting:

  • open https://<CODE server host + port if not the default>/hosting/discovery in a browser,
  • check if the host in the URL is the same as the <CODE server host + port if not the default>, if not, you may have to edit server_name in /etc/coolwsd/coolwsd.xml,
  • open one of those URLs in the browser, it should open a blank CODE UI with some error message (that’s fine), if you get to this point, CODE should be accessible from NC,
  • if you still get some blank screen when opening a file in NC, check the browser console for error messages like CSP violation.

Let’s see if you can get to this point.

Hi all,

connected to my previous post, I had the same issue.
After following the instructions on the webpage: server_name in /etc/coolwsd/coolwsd.xml and reverse proxy with nginx webserver, things worked OK.

The only change to the locations I had to make was to change
proxy_pass https://<intern_ip>:
to
proxy_pass http://<intern_ip>:

=> can someone explain why this could be and what the impact if this change is?

Thanks + kind regards.

I’ve gotten a little further, but I still can’t open the documents in the nextcloud. I have installed a new container LXC 192.168.1.110 (debian 11 netinst), which will be designed for collabora.
Installation procedure

apt install apt-transport-https ca-certificates
apt-get install gnupg2	
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
nano /etc/apt/sources.list.d/collabora.list
deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 ./
apt update
apt install coolwsd code-brand
coolconfig set ssl.enable false
coolconfig set-admin-password
systemctl restart coolwsd

That’s all I did

If I enter the web browser url 192.168.1.110:9980 the result is OK
If I enter the web browser url http://192.168.1.110:9980/browser/dist/admin/admin.html the result is


If I enter the web browser url http://192.168.1.110:9980/hosting/discovery the result is

Whether everything is fine.

I have created a public domain with a valid ssl certificate.
Next, I set up a reverse proxy 192.168.1.105

server {
 listen       443 ssl;
 server_name  collabora.example.com;


    ssl_certificate /etc/letsencrypt/live/collabora.example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/collabora.example.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

 # static files
 location ^~ /browser {
   proxy_pass http://192.168.1.110:9980;
   proxy_set_header Host $http_host;
 }


 # WOPI discovery URL
 location ^~ /hosting/discovery {
   proxy_pass http://192.168.1.110:9980;
   proxy_set_header Host $http_host;
 }


 # Capabilities
 location ^~ /hosting/capabilities {
   proxy_pass http://192.168.1.110:9980;
   proxy_set_header Host $http_host;
 }


 # main websocket
 location ~ ^/cool/(.*)/ws$ {
   proxy_pass http://192.168.1.110:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }


 # download, presentation and image upload
 location ~ ^/(c|l)ool {
   proxy_pass http://192.168.1.110:9980;
   proxy_set_header Host $http_host;
 }


 # Admin Console websocket
 location ^~ /cool/adminws {
   proxy_pass http://192.168.1.110:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }
}

If I enter the web browser url https://collabora.example.com/browser/dist/admin/admin.html the result is

If I enter the web browser url https://collabora.example.com/hosting/discovery the result is

I set up server in nextcloud


When I want to open the docx/odt file in nextcloud I see
nextcloud02

Hi,

to be honest - guessing now: did you add your server name to all coolwsd.xml files and does the domain-env in the colalbora setup point to the nc-server?

HTH + kind regards!

I set in coolwsd.xml

<storage desc="Backend storage">
                <filesystem allow="false"/>
                <wopi allow="true" desc="Allow/deny wopi storage.">
                        <host allow="true" desc="Regex pattern of hostname to allow or deny.">nextcloud.example.com</host>
                        <host allow="true" desc="Regex pattern of hostname to allow or deny.">10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
                        <host allow="true" desc="Regex pattern of hostname to allow or deny.">172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}</host>
etc...

of course example.com I replaced my original domain.

Hi,

OK - I did not modify this part at all - I was referring to the <server_name< setting mentioned in the intructions:

<server_name desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default=""></server_name>

Kind regards

I tried to add

<server_name default="collabora.example.com" desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string"/>

resp

<server_name desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default="">collabora.example.com</serv>

Still without success

Hello Gusto,

sorry - went through my setup but that’s all I needed to do.
Maybe someone else needs to chime in here…

Kind regards

Would you be able to provide me with the config file coolwsd.xml and the server block from the reverse proxy?
What exactly did you change in config files?

I installed coolwsd on my desktop for training.
Since coolwsd is on localhost, I don’t use any reverse proxies.
I just set

sudo coolconfig set ssl.enable false
sudo coolconfig set-admin-password

How do I open a document in a web browser?
I saved the file to /home/gusto/test.odt
When I want to open this file in a web browser, I’ll go to

http://192.168.1.2:9980/browser/dist/load.doc.html

opendoc01

I click on “Load Collabora Online”
A new tab in a web browser opens


Then nothing happens

Could you paste here what you see in the console (web dev tools F12 → console)