Issue installing Collabora following official guide

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.

Hello,

maybe I can help some posters in this thread

I could make works collabora docker image on debian Jessie after compiling kernel 4.7.2 with Iptables NAT options and deleted aufs folder in /var/lib/docker

Hello Hans,

how did you manage get things working? Iā€™m facing the same problem and already added the trusted key, however still getting the same error.

Iā€™m using letsencrypt for the cert.

Thanks,
Thomas

hi

itā€™s good solution for Debian 8 user/server

big thankā€™s

After 2 weeks of problems trying to get Collabora and Nextcloud working I previously had various SSL errors and all sorts of things but have worked my way through all of them but now when I either try to create a new document or open an existing one I get a grey box and looking in Chrome Dev Tools I see this:

Refused to frame 'https://192.168.0.71/loleaflet/1.8.2/loleaflet.html?WOPISrc=https%3A%2F%2Fcā€¦F5382&title=New%20Presentation.odp&lang=en&closebutton=1&revisionhistory=1' because it violates the following Content Security Policy directive: "frame-src 'self' http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js 'unsafe-eval' https://office.mydomain.com".

192.168.0.71 is the server the docker container for Collabora is installed and office.mydomain.com points to 192.168.0.71. I canā€™t figure out where the actual server IP address is being picked up from rather than using the domain name?

Feel like Iā€™m now so close.

Hello Thomas,

Apart from copying the trusted key, I also did the following in order to resolve the issue:

Although I am not an expert, to me it looked like the OpenSSL is more picky about the Intermediate certificates. When I called the domains https://nextcloud.mydomain.com and https://office.mydomain.com with my regular browser, like chrome, the connection was green, because chrome (and internet explorer) have somehow their own way of retrieving the intermediate certificates.
The OpenSSL client, which is used by php, needs the intermediate certificates from the server.
When I called OpenSSL from the Linux system, where my webserver is installed
openssl s_client -connect office.mydomain.com:443

in the last line of the output there has to be a ā€œVerify return code: 0 (ok)ā€ for both domains. I had to play around with my apache SSL configuration, calling the correct files and restartig the system a couple of times until I had this worked out. I donā€™t know how you do this configuration with Letā€™sEncrypt, because I did this manually. But maybe you can verify, that the openssl-command returns ā€œ0ā€ for both domains in order to be sure, that your SSL configuration in apache is correct.

Kind Regards,
Hans

Hello Steven, Iā€™m having the exact same problem, as you said in your last post.

Iā€™ve tried all the solution without any luck.

Hope we can figure it out soon.

David

Hi,

I try to install collabora now on Ubuntu 16.04, but it still not work for me. I use docker, and I followed the official guide (certificates are from Letā€™s Encrypt in my case).

When I open a document, I have this:

I can see this error in my Apache logs:
[Mon Sep 05 19:03:27.468383 2016] [:error] [pid 15932] [client 172.17.0.2:38616] PHP Fatal error: Uncaught Exception: Session has been closed - no further changes to the session are allowed in /var/www/xxxx/xxxx/xxxxx/xxxxx/httpdocs/lib/private/Session/Memory.php:120\nStack trace:\n#0 /var/www/xxxx/xxxxxx/xxxxx/xxxxx/httpdocs/lib/private/Session/Memory.php(53): OC\Session\Memory->validateSession()\n#1 /var/www/xxxxx/xxxxx/xxxxxx/xxxxxx/httpdocs/lib/private/Session/CryptoSessionData.php(164): OC\Session\Memory->set(ā€˜encrypted_sessiā€¦ā€™, ā€˜68c7c806f7449dcā€¦ā€™)\n#2 /var/www/xxxxxxx/xxxxxx/xxxxxx/xxxxxx/httpdocs/lib/private/Session/CryptoSessionData.php(67): OC\Session\CryptoSessionData->close()\n#3 [internal function]: OC\Session\CryptoSessionData->__destruct()\n#4 {main}\n thrown in /var/www/xxxxxx/xxxxxx/xxxxxx/xxxxxxx/httpdocs/lib/private/Session/Memory.php on line 120

Do you know why do I have that?

Thank you - I will try it!
Kind regards
Thomas

@Floreal_C
disable NC encryption, then re-upload the file and see if itā€™s going to open

Hello Steven, David, Iā€™m having the exact same problemā€¦
3 days without solutions, no errors, no logs errors.

Because of the problems with the current docker image I tried to go down the road and compile on a fresh installed ubuntu 16 machine. Libreoffice 5.1.4 did build fine. Libreoffice online part 1: loolwsd fails. Is there anyone here with suggestions what might be the problem?

In file included from ChildSession.hpp:20:0,
from ChildSession.cpp:10:
LibreOfficeKit.hpp: In member function ā€˜char* lok::Document::getPartHash(int)ā€™:
LibreOfficeKit.hpp:138:31: error: ā€˜LibreOfficeKitDocumentClass {aka struct _LibreOfficeKitDocumentClass}ā€™ has no member named ā€˜getPartHashā€™
return _pDoc->pClass->getPartHash(_pDoc, nPart);

anyone knows how to hide svg graphics?

And in the video its really fast, is there any speed/tuning tipps?
Cheers :slight_smile:

Hello there, I finally managed to get Collabora working! This is what I used, although I am sure there are other ways. I have a Nextcloud installation on my website, www.dom134.com [name changed to protect the innocent]. I get to it through the url www.dom134.com/nextcloud. My Collabora docker image is set to run from office.dom134.com. Maybe next year I will use Letsencrypt, but this year I spent $9.00 buying another SSL certificate for this Collabora URL.

On my Nextcloud admin page, I have set the Collabora Online Server to https://office.dom134.com:443.

To me the crucial bit is where you set your docker running. I run my Nextcloud at www.dom134.com/nextcloud and so would expect to put that in the docker statement, but instead I have used:

docker run -t -d -p 127.0.0.1:9980:9980 -e ā€œdomain=www backslash .dom134 backslash .comā€ --restart always --cap-add MKNOD collabora/code

Which works.

I have also allowed 9980 in ufw, I am not sure I need itā€¦

sudo ufw allow 9980/tcp

I have found though, that if you make any changes then Collabora will fail with either the grey screen or the dreaded: We are sorry, this is an unexpected connection error. Please try again
This will be resolved by stopping docker and rerunning it.
docker ps
docker stop [insert docker id from previous id]
docker run -t -d -p 127.0.0.1:9980:9980 -e ā€œdomain=www backslash .dom134 backslash .comā€ --restart always --cap-add MKNOD collabora/code

I hope this helps

Hello, I having the unexpected connection error and a gray screen all the times.
A couple of questions:
You run Collabora and Nextcloud in the same server?
Why did you use the Nextcloud server domain name to run collabora>

Thanks

David

Yes, thatā€™s right, Collabora and Nextcloud run on the same server.
Following the installation guide at https://nextcloud.com/collaboraonline/ the docker run line specifies that you put your nextcloud instance at the docker run command. My installation runs at www.dom134.com/nextcloud; however in order to get my Collabora to work I had to use www.dom134.com only.

That is interesting because I donā€™t get a connection error, but I have the same gray screen symptom that you are having.

Hello Hans,

I managed to fix it - thanks for your help!
The problem was that I use bind9 on the same server as dns because of NAT-loopback.
So I just had to add localhost as dns serverā€¦