添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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?

sebmza

Check if it’s resolvable locally:

nslookup collabora.mydomain

You may try curl on command line:

curl -vv https://collabora.mydomain

sebmza:

/etc/hosts

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

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.

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.

mrmarkuz:

Just to be sure: This is a masked domainname and you are using a resolvable domain with valid cert (letsencrypt)?

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.

mrmarkuz:

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

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

Thank you,

sebmza

sebmza:

We don’t have any problem accessing Nethserver neither Nextcloud from the Internet; only Collabora.

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

sebmza:

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

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

sebmza:

We have internal and external DNSes and we use firewall and mod_proxy to redirect incoming web traffic for some internal services and projects.

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
  • 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

    mrmarkuz:

    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

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

    mrmarkuz:

    Please share your config:

    config show loolwsd

    I get:

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

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

    mrmarkuz:
  • 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.
  • I’ve used the same Internal and external names for Nethserver, Nextcloud and Collabora.

  • If you use reverse proxy from a firewall to collabora, check that you reverse proxy all paths correctly
  • 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:

    Collabora Productivity

    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.

    mrmarkuz:

    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.

    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

    When I create a new document I get: Failed to load: May 18 08:26:38 nextcloud loolwsd[27981]: kit-18536-27983 2020-05-18 06:26:38.053072 [ kitbroker_016 ] ERR Failed to load: file:///user/docs/DdrGXFQmCYywPo3z/provadocumento.odt, error:...

    Reading time: 3 mins 🕑 Likes: 6 ❤ oneitonitram:

    if i set 127.0.0.1:9980 the sever on nextcloud becomes online, but pages are not able to load.

    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
     oneitonitram:
    

    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’s no need to create a reverse proxy, it’s all done by the module.

    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.