Issue installing Collabora following official guide

It seems I am lying. It isnā€™t using AUFS but using devicemapper:

root@portal:/var/www/nextcloud# ls -l /var/lib/docker/
total 32
drwx------ 5 root root 4096 Aug 15 13:11 containers
drwx------ 5 root root 4096 Aug 12 20:22 devicemapper
drwx------ 3 root root 4096 Aug 12 20:19 image
drwxr-x--- 3 root root 4096 Aug 12 20:19 network
drwx------ 2 root root 4096 Aug 12 20:19 swarm
drwx------ 2 root root 4096 Aug 12 20:24 tmp
drwx------ 2 root root 4096 Aug 12 20:19 trust
drwx------ 2 root root 4096 Aug 12 20:19 volumes
1 Like

I finally managed to get NextCloud-Collabora/Code working on Jessie.
The official guide is absolutely fantastic, thanks guys, but need to add a note as (today) Docker aufs on Jessie has got issues so devicemapper should be used instead.

Once I switched to devicemapper got to the following issue described by @jospoortvliet :

wsd-BLA ~DocumentBroker [https://cloud.josandcamila.com/apps/richdocuments/wopi/files/3610765?access_token=W7hLlzliRy7FYYY9BIqE3WTiBUoqgcMh] destroyed with 0 sessions left.

After much pain and testing I rechecked also NextCloud configuration to find that ā€œoverwrite.cli.urlā€ was set to http instead of https, Added the ā€œsā€ and it loaded the documents flawlessly.

I also had the problem

[ loolkit ] link("/opt/collaboraoffice5.1/CREDITS.fodt","/opt/lool/child-roots/1032/lo/CREDITS.fodt") failed. Exiting. (errno: Operation not permitted)

I changed the permissions of the files to belong to lool:lool (uid 105 gid 108), but I did it for all the files below /opt/collaboraoffice5.1.
Now this error is gone and I run into another error.

mknod(/opt/lool/child-roots/1973//dev/random) failed. (errno: Operation not permitted)

I think this is because I changed permisisons too generously. I donā€™t have any more time today maybe someone wants to fiddle it out or I will try tomorrow :slight_smile:

I can answer the question about different portnumbers now. Putting the portnumber in several ways after the domainname didnā€™t work. So Iā€™ve added --expose <portnumber> to the line from the docs and it is running :slight_smile:

The solution with --devicemapper is not optimal I think as long as https://github.com/docker/docker/issues/15629#issuecomment-238178503
is still true. I donā€™t get the thin provisioning on a dedicated device working on debian 8.

Is there a way to specify more than one Nextcloud hosts/domains to be accepted when starting the docker container ?

Please have a look at Allow several domains for Collabora?

1 Like

Hey Pupaxxo, i have the same problem, could you please tell me on what file exactly you change this line ?
Thank you in advance.

EDIT : Here is the answer of @pupaxxo :
I edited this file apps/richdocuments/controller/documentcontroller.php
adding this line $token = str_replace("?encoding=text", ā€œā€, $token); after the token variable declaration

So i done that then i got an error in docker : wrong permission.

So i had to edit /etc/default/docker and to add this line :
DOCKER_OPTS="ā€“storage-driver=aufs"
(Be sure to have Linux Extra image installed apt-get install linux-image-extra-$(uname -r) )
Made a reboot, rebuild the docker image and itā€™s working now.

Hi,

I have succesfully installed collabora but for some reasin it is extremely slow. It takes about 20 seconds to open a document. In the docker log I can find anything that might be the problem. Maybe someone else can see it?

I have put the log here since it is to big to put in the code tags.

There is already a thread, yes 20 seconds (donā€™t be too excited about the ā€˜solvedā€™ tag)

Yes for the moment there is two solutions :

1- compile yourself loolwsd, loleaflet and libreoffice and some dependencies

2- use the docker image to take out necessary files to working inside your system and not into dockerā€™s one.

I have the same setup, guessing would need a self-signed certificate and maybe could edit the hosts file?

Are there sizing whitepapers or some hints for hardwarescaling?

not yet, weā€™re actually looking for customers to work with us getting this set up for 10K users or so and create a nice set of best practices for that. Collabora has experience with it so it shouldnā€™t be super painful but it has to be done on our side a few times first before Iā€™m happy to write a white paperā€¦

To everyone who faced the unexpected connection error:

Please check if you have restricted the collabora online app within nextcloud/ownCloud to a specific user-group.
This doesnā€™t work now - seems to be a bug.
Filed here: https://github.com/owncloud/richdocuments/issues/102

I wrote a little article about that behavior (german only by now - sorry)
https://www.2good4you.net/blog/19-web-stuff/6-collabora-online-unter-debian-8

1 Like

Summary for the Debian Jessie problem


  • Make the docker image run properly

Also known as Link problem:

[ loolkit ] link(ā€œ/opt/collaboraoffice5.1/CREDITS.fodtā€,ā€œ/opt/lool/child-roots/1032/lo/CREDITS.fodtā€)
failed. Exiting. (errno: Operation not permitted)

Donā€™t install a backport kernel, simply switch from aufs to devicemapper.
Easiest way:

apt-get remove --purge docker-engine
mv /var/lib/docker /var/lib/docker.old
apt-get install docker-engine


systemctrl stop docker
mv /var/lib/docker/aufs /var/lib/docker/devicemapper
systemctrl start docker

Changing /etc/default/docker and add DOCKER_OPTS=ā€œā€“storage-driver=aufsā€ does not work on systemd.
Installing docker from other sources (script based etc) is not necessary.

  • remove unexpected connection error

Dont restrict the nextCloud/ownCloud app to a specific user group



Are there still other problems out there?

4 Likes

Does anyone know how to install fonts (ttf) that can be displayed or used in a document by Collabora?
Installing the fonts in the hosting Linux environment does not seem to suffice.

1 Like

Hi, i tried to install collabora into my nextcloud installation.
I followed the guide and have come to the point where i met an error:

its on the second part from i understand. When i try to make a new doc the file itself is made, but Collabor does not open it.

in the docker.log from var/logs is no entry at all (last one is from 2 days ago).
the logging from nextcloud throws the folowing debugging infos: (newest to oldest)

Debug no app in context Issuing token for USER file 43, version 0 owned by USER, path/to/file/file
Debug richdocuments Generating WOPI Token for file 43, version 0.
Info admin_audit File accessed: "path/to/file/file "
Debug no app in context Storing the discovery.xml to the cache.
Debug no app in context getDiscovery(): Getting discovery.xml from the cache.
Debug no app in context Storing the discovery.xml to the cache.
Debug no app in context getDiscovery(): Getting discovery.xml from the cache.
Error files Could not find resource file ā€œ/apps/files/js/jquery.iframe-transport.jsā€

apache log:
No protocol handler was valid for the URL /lool/ws/https://spdatabase.v22016023347031802.supersrv.de/index.php/apps/richdocuments/wopi/files/43. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule

Could it be the missing proxy_wstunnel mod?
I hope someone can help. i couldnt manage to find anything on google that helped me.

Debian Wheezy
Apache 2.2.20
PHP 5.5.38
mysql 5.5.50
Kernel 3.16
Nextcloud 10 (latest 9 version same behaviour and Errors)

Thanks for your Time patient reader
Esh

Hello, Iā€™ve tried to install collabora using the docker image and doesnā€™t work, at first I get the "unexpected error " trie every suggestion in this forum but nothing happen, so I decided to restart, I installed a fresh machine Ubuntu 16.04, installed docker, download collabora image and now donā€™t get any error but when try to open a document from nextcloud the part of the screen where the document suppose to open turns gray and nothing happens, not even the toolbar appear.
After this I decided to compile the LOOL myself and after building all and start the service I have the same behavior, the part of the screen where the document suppose to open turns gray and nothing happens, not even the toolbar appear.

Can anybody help on this problem?

Here are the logs when I open the file:

wsd-43358-02 00:00:10.325516 [ prison_ws ] New child [43375].
wsd-43358-02 00:00:10.326073 [ prison_ws ] ChildProcess ctor [43375].
wsd-43358-02 00:00:10.326349 [ prison_ws ] Have 2 children.
kit-43375-00 00:00:10.265080 [ loolkit ] SocketProcessor starting.
wsd-43358-00 00:00:10.327842 [ prison_ws ] SocketProcessor starting.
kit-43381-00 00:00:10.337845 [ loolkit ] lok::Office ctor.
kit-43381-00 00:00:10.337938 [ loolkit ] Process is ready.
wsd-43358-03 00:00:10.401104 [ prsnr_req_hdl ] Request from 127.0.0.1:56136: GET /loolws/newchild?pid=43381 HTTP/1.0 / Connection: Upgrade / Upgrade: websocket / Sec-WebSocket-Version: 13 / Sec-WebSocket-Key: 8Ax+Q6Oy3mEwB3haYhGqPQ== / Host : 127.0.0.1:9981
wsd-43358-03 00:00:10.401486 [ prison_ws ] Child connection with URI [/loolws/ne wchild?pid=43381].
wsd-43358-03 00:00:10.401732 [ prison_ws ] New child [43381].
wsd-43358-03 00:00:10.402200 [ prison_ws ] ChildProcess ctor [43381].
kit-43381-00 00:00:10.340515 [ loolkit ] SocketProcessor starting.
wsd-43358-03 00:00:10.402598 [ prison_ws ] Have 3 children.
wsd-43358-00 00:00:10.402820 [ prison_ws ] SocketProcessor starting.
wsd-43358-10 00:00:15.183308 [ loolwsd ] Total memory used: 175300
wsd-43358-10 00:00:30.260926 [ loolwsd ] Total memory used: 175732
wsd-43358-03 00:00:31.185803 [ client_req_hdl ] Request from 127.0.0.1:41164: GE T /hosting/discovery HTTP/1.1 / Host: 127.0.0.1:9980 / User-Agent: Nextcloud Ser ver Crawler / X-Forwarded-For: XXX.XX.XX.XX / X-Forwarded-Host: office.cne.go.cr / X-Forwarded-Server: office.cne.go.cr / Connection: Keep-Alive
wsd-43358-03 00:00:31.186257 [ client_req_hdl ] Handling GET: /hosting/discovery
wsd-43358-03 00:00:31.186527 [ client_ws_0001 ] Thread started.
wsd-43358-03 00:00:31.212620 [ client_ws_0001 ] Sent discovery.xml successfully.
wsd-43358-03 00:00:31.213234 [ client_ws_0001 ] Thread finished.
wsd-43358-10 00:00:35.286972 [ loolwsd ] Total memory used: 176092
wsd-43358-10 00:01:10.467785 [ loolwsd ] Total memory used: 176160

Thank you.

David

Hi, Iā€™ve tried running it on the same server (so Iā€™m using 127.0.0.1 instead of a domain name in the virtual hosts file).

This is the error in full:

Collabora Online unknown error: Client error response [url] https://cloud.sptmin.com/hosting/discovery [status code] 404 [reason phrase] Not Found
Please contact the ā€œhttps://cloud.sptmin.comā€ administrator.

Iā€™m getting a 404 error still. Any idea what I should do?

Contents of the virtual hosts file:

<VirtualHost *:443>
ServerName cloud.sptmin.com:443

SSL configuration, you may want to take the easy route instead and use Lets Encrypt!

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/cloud.sptmin.com/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/cloud.sptmin.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloud.sptmin.com/privkey.pem
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder on

Encoded slashes need to be allowed

AllowEncodedSlashes On

Container uses a unique non-signed certificate

SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off

keep the host

ProxyPreserveHost On

static html, js, images, etc. served from loolwsd

loleaflet is the client part of LibreOffice Online

ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet

WOPI discovery URL

ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery

Main websocket

ProxyPass /lool/ws wss://127.0.0.1:9980/lool/ws

Admin Console websocket

ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws

Download as, Fullscreen presentation and Image upload operations

ProxyPass /lool https://127.0.0.1:9980/lool
ProxyPassReverse /lool https://127.0.0.1:9980/lool

Hello,

Iā€™m trying to set up LibreOffice Online. I tried a plethora of combinations (even tried to compile loolwsd on my own), but neither of them worked, whatever I do, loolwsd comes up with another kind of error phenomenons, itā€™s almost ridiculous how nothing can get it to work and how many creative ways can it fail.

My actual error is similar to what others have already mentioned: when I try to edit a document, I get ā€žWe are sorry, this is an unexpected connection error. Please try again.ā€.

Docker has been started like this:
docker run -t -d -p 192.168.1.155:9980:9980 -e ā€œdomain=xenialā€ --cap-add MKNOD collabora/code
Domain: I tried to substitute my ownCloud instanceā€™s name there, that didnā€™t work, and now it is loolwsdā€™s internal hostname. Iā€™m not entirely sure what domain should be written there. What Iā€™ve tried:
ā€“ public domain name of my ownCloud (letā€™s call it cloud.mydomain.tld);
ā€“ private domain name of the ownCloud host (ownCloud.lan);
ā€“ now it is ā€œxenialā€ / ā€œxenial.lanā€, which is the host where loolwsd is running.
As I said, neither of these worked.

The docker output shows these lines:

wsd-00021-05 00:02:30.064425 [ client_ws_0004 ] WOPI host is not on the same host as the WOPI client: ā€œX.X.X.Xā€. Connection is not allowed.
wsd-00021-05 00:02:30.064460 [ client_ws_0004 ] No acceptable WOPI hosts found matching the target host [cloud.mydomain.tld] in config.
wsd-00021-05 00:02:30.299793 [ client_ws_0004 ] ClientRequestHandler::handleRequest: BadRequestException: Invalid URI or access denied.

(I quoted only the lines I find suspicious. If you need the rest, ask away.)

X.X.X.X is my public IP address, I actually have no Idea why I see it there since both ownCloud and loolwsd should only see private IPs. Maybe it resolves cloud.mydomain.tld?

To be honest, I am really confused what should communicate with what on which ports. At first I thought ownCloud clients donā€™t need to connect the loolwsd server directly, but meanwhile it turned out itā€™s necessary. It would help a lot to have a diagram or something to see how it all should assemble together. Since currently there is no way to access loolwsd from the Internet, I at least would like to see it work on my private network.

I try to explain how the current setup looks like: I have a reverse proxy which accepts connections from the Internet on a public IP and forwards HTTP traffic to ownCloud.lan (which is a private host on my LAN, has no public IPv4 address). The reverse proxy also performs SSL offloading, thus connections are only encrypted until the proxy, and there is no encryption between the reverse proxy and ownCloud. Then there is xenial.lan which is basically a drop-away test VM, for now I want to set up LOOL on that. The loolwsd currently runs in docker, and as the tutorial suggested, I set up a reverse proxy for it, even though I donā€™t fully understand the proxyā€™s supposed role here. This proxy runs on xenial, and it IS NOT the same reverse proxy that is bridging connections from the Internet to ownCloud.lan, but it is very likely that I will set up my Internet-facing reverse proxy to forward connections to loolwsd too.

Any insights are welcome, thanks in advance.

~ MegaBrutal

P.S.: Yeah, I know itā€™s a Nextcloud forum, but I really donā€™t think is that ownCloud is the problem here. Iā€™m thinking on adopting Nextcloud though.