Collabora: Failed to load Collabora Online

NethServer Version: NethServer release 7.7.1908
Module: nethserver_collabora version 0.1.1 release 1.ns7

I followed the instructions at https://docs.nethserver.org/en/v7/collabora.html and have configured it in the same host: Nethserver, Nextcloud, Collabora. But can’t get rid of what it seems a simple host resolution problem.

The error messages
Users: Failed to load Collabora Online - please try again later✖
Admin log: GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: collabora.mydomain Unknown error (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

If I query the virtualhost dedicated to Collabora I get:
[root@patoruzu]# config getprop loolwsd VirtualHost
collabora.mydomain

I added collabora.mydomain at the Let’s Encrypt certificate too.

AFAIK Collabora is listening only at localhost, is that ok?
127.0.0.1:9980 0.0.0.0:* LISTEN 40665/loolwsd

As a test, I added manually “collabora” as a host in /etc/hosts but nothing changed.

Any ideas of what I could do wrong?

TIA,


sebmza

Check if it’s resolvable locally:

nslookup collabora.mydomain

You may try curl on command line:

curl -vv https://collabora.mydomain

You should use the server manager DNS page or a custom template for that else it will be overwritten as it’s templated.

and Can Collabora and onlyoffice be installe don the same Nethserver isntance, and what are the main differences

Yes.

Different underlying software. Collabora essentially runs a headless LibreOffice, so everything is done server-side. OnlyOffice, as I understand, runs much of the grunt-work in the browser. It’s therefore been reported that OnlyOffice is quite a bit more responsive.

1 Like

open office?! or only office

OnlyOffice, fixed my post. Thanks.

And does onlyoffice require its own subdomain to run?

One of my old servers got blown up. am re-installing everything…

Thanx Markus, I forgot adding collabora.mydomain to our internal DNS.

Now I get error number 7

GuzzleHttp\Exception\ConnectException: cURL error 7: Failed connect to collabora.mydomain:9980; Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

I found 2 apache config file for Collabora:

/etc/httpd/conf/loolwsd.conf (with 755 permissions)

and a:

/etc/httpd/conf.d/zz_collabora.conf (which has the virtualhost lines)

What I could effectively do is to access the admin page.

Any help would be appreciated.

TIA,


Seb

This should not be necessary as it should be resolvable externally.
Just to be sure: This is a masked domainname and you are using a resolvable domain with valid cert (letsencrypt)?

I assume this should be /etc/loolwsd/loolwsd.xml
If not please move away, restart httpd and check if it works.

No it doesn’t, Nethserver/Nextcloud/Collabora server is inside our LAN and uses our internal DNS (which is not Nethserver)

We don’t have any problem accessing Nethserver neither Nextcloud from the Internet; only Collabora. We have internal and external DNSes and we use firewall and mod_proxy to redirect incoming web traffic for some internal services and projects.

I’m using a real FQDN with a valid letsencrypt certificate, the only difference is Nextcloud is configured in a directory of Nethserver while Collabora has it’s own virtual hostname, but all services are in the same hardware inside our LAN.

Nope, would a full description of the curl error log be of any help?

Thank you,


sebmza

Could you use collabora in the local network? If yes you maybe need to change the VirtualHost to the external DNS name.

Does this work locally?

curl localhost:9980

Please share your config:

config show loolwsd

Yes, please also look into /var/log/messages.

There could be problems:

  • Collabora/Nextcloud asking wrong DNS server or it gives back internal name. You need to use the external name as you can use the external name internally but not the other way round.
  • If you use reverse proxy from a firewall to collabora, check that you reverse proxy all paths correctly

Hi,

I put my answers to your questions below this message as I want to mention in first place some new findings.

New findings

The collaborahost resolves to the same IP than Nethserver and Nextcloud, but process ‘loolwsd’ is listening at localhost:9980. As the message was connection refused to https://collabora.mydomain:9980/hosting/discover (even from command line with curl) I managed to make it listen in every interface.

Now (testing from command line) I get:
[root@myhost]# curl https://collabora.mydomain:9980/hosting/discovery
curl: (35) SSL received a record that exceeded the maximum permissible length.

Answers

Nobody is working at our offices at this moment because of COVID-19 pandemia.
The curl sentence returned OK

I get:

loolwsd=service
    AllowWopiHost=
    VirtualHost=collabora.mydomain
    status=enabled

I’ve been checking /var/log/messages, I only found info about user login.

I’ve used the same Internal and external names for Nethserver, Nextcloud and Collabora.

I checked my Apache Proxy, this are my lines:

<VirtualHost *:80>
    ServerName collabora.mydomain
    ProxyPreserveHost    On
    ProxyPass            /         http://collabora.mydomain/
    ProxyPassReverse     /         http://collabora.mydomain/
</VirtualHost>

<VirtualHost *:443>
    ServerName collabora.mydomain
    ProxyPreserveHost    On
    ProxyPass            /         https://collabora.mydomain/
    ProxyPassReverse     /         https://collabora.mydomain/
</VirtualHost>

Thaks a lot.

I am afraid it’s not working that way and it seems not supported (only local reverse proxy)
To make it work with reverse proxy not on same machine as collabora I read that you need to open the loolwsd port 9980 on the collabora machine, make it listen to all interfaces and enable SSL.
Then edit the collabora httpd config and point to https://collabora.mydomain:9980 or wss://collabora.mydomain:9980 instead of 127.0.0.1:9980.
I wasn’t able to get that working.

Here are the possibilities to reverse proxy collabora:

Here is a similar problem solved with opening ports and reverse proxying to https://collabora.mydomain:9980:

The problem is that Nethserver preconfigures Collabora for using a local reverse proxy (recommended) without SSL so you need custom templates and there’s also an action that sets to only listen to loopback.

As an alternative you may port forward HTTP/HTTPS from your firewall to your nextcloud/collabora machine and do the further reverse proxying there. This way you can leave the collabora/nextcloud machine unchanged.

Hi Markus,

Thanks a lot, I found your wiki page and tried the testing repo… I updated Collabora and the problem disappeared! I made no further configuration from yesterday! The only package that was updated this morning is python2-pyrfc3339, which seems has no relation to Collabora.

HTH someone else, regards.

1 Like

Glad it works now!
My repo should have no relation to Collabora anymore.
Maybe it helped to install the collabora repo as explained in the wiki…

Yes, that’s what I meant to say. Thanx.

1 Like

i have been facing challenges with a new collabora installation, where if i set 127.0.0.1:9980 the sever on nextcloud becomes online, but pages are not able to load.
when i set collabora.domain.tld its not online, yet i have specified the hostname.

i created a reverse proxy for the subdomain, an it comfirmed collabora online, but the pages are now loading blank when i try to create xls or docx documents

There was a bug with opening newly created documents, if you open them again it worked.

Editing httpd configs directly should not be necessary.
The hostname is set via db prop:

[root@server2 ~]# config show loolwsd
loolwsd=service
    AllowWopiHost=
    VirtualHost=collabora.mrmarkuz.domain.org
    status=enabled

There’s no need to create a reverse proxy, it’s all done by the module.

1 Like

i have removed the reverse proxy and now am just getting a weired error :failed to read document from storage

i was able to resolve the issue through this post Improvements for Nethserver-Collabora - Feature - NethServer Community

it seems i must create an alias for nextcloud.domain.tld for collabora online to work.

1 Like