Issue installing Collabora following official guide

Hi,

I have the same problem of a lot of people: when I open a document I have the message “We are sorry, this is an unexpected connection error. Please try again.”.

Here is my docker logs when the document is opened:

kit-00085-00 00:00:51.892720 [ loolkit ] Process started.
kit-00085-00 00:00:51.892951 [ loolkit ] Jail path: /opt/lool/child-roots/85/
kit-00085-00 00:00:51.893684 [ loolkit ] symlink(“…/lo”,“/opt/lool/child-roots/85/opt/collaboraoffice5.1”)
kit-00085-00 00:00:52.052085 [ loolkit ] link(“/opt/collaboraoffice5.1/LICENSE”,“/opt/lool/child-roots/85/lo/LICENSE”) failed. Exiting. (errno: Operation not permitted)
frk-00031-00 00:00:52.893093 [ loolforkit ] Child 85 has exited, removing its jail ‘/opt/lool/child-roots/85’
wsd-00022-10 00:00:55.833810 [ loolwsd ] Total memory used: 200752
wsd-00022-03 00:00:56.537906 [ client_ws_0001 ] getNewChild: No live child, forking more.
wsd-00022-03 00:00:56.538015 [ client_ws_0001 ] getNewChild: Timed out while waiting for new child.
wsd-00022-03 00:00:56.538063 [ client_ws_0001 ] Failed to get new child. Service Unavailable.
wsd-00022-03 00:00:56.538407 [ client_ws_0001 ] ClientRequestHandler::handleRequest: WebSocketErrorMessageException: Service is unavailable. Please try again later and report to your administrator if the issue persists.
wsd-00022-03 00:00:56.538929 [ client_ws_0001 ] Thread finished.
wsd-00022-00 00:00:56.679420 [ loolwsd ] MasterToForKit: spawn 1
wsd-00022-00 00:00:56.679516 [ loolwsd ] Writing to pipe. Data: [spawn 1].
frk-00031-00 00:00:56.026374 [ loolforkit ] readFIFO for pipe: wsd_pipe_rd returned: 8
frk-00031-00 00:00:56.026484 [ loolforkit ] Read line from pipe: wsd_pipe_rd, line: [spawn 1], data: .
frk-00031-00 00:00:56.026553 [ loolforkit ] ForKit command: [spawn 1].
frk-00031-00 00:00:56.026633 [ loolforkit ] Spawning 1 child per request.
frk-00031-00 00:00:56.026721 [ loolforkit ] Creating 1 new child.
frk-00031-00 00:00:56.026784 [ loolforkit ] Forking a loolkit process.
frk-00031-00 00:00:56.032659 [ loolforkit ] Forked kit [90].
kit-00090-00 00:00:56.033241 [ loolforkit ] Initializing kit
kit-00090-00 00:00:56.033428 [ loolforkit ] Log level is [8].
kit-00090-00 00:00:56.033581 [ loolkit ] Process started.
kit-00090-00 00:00:56.033891 [ loolkit ] Jail path: /opt/lool/child-roots/90/
kit-00090-00 00:00:56.034586 [ loolkit ] symlink(“…/lo”,“/opt/lool/child-roots/90/opt/collaboraoffice5.1”)
kit-00090-00 00:00:56.195244 [ loolkit ] link(“/opt/collaboraoffice5.1/LICENSE”,“/opt/lool/child-roots/90/lo/LICENSE”) failed. Exiting. (errno: Operation not permitted)
frk-00031-00 00:00:57.033940 [ loolforkit ] Child 90 has exited, removing its jail ‘/opt/lool/child-roots/90’

In the javascript console, I have also the error:

leaflet-src.js (ligne 2839, col. 1)TypeError: doclayer is undefined

Can you help me to resolv the problem?

Thank you in advance
Floreal.

@rigrig how did you get docker to work. When I upgrade to 4.6 kernel it fails stating:

Jul 25 11:36:53 lenz docker[645]: time="2016-07-25T11:36:53.326947364+01:00" level=error msg="[graphdriver] prior storage driver \"aufs\" failed: driver not supported"
Jul 25 11:36:53 lenz docker[645]: time="2016-07-25T11:36:53.333684373+01:00" level=fatal msg="Error starting daemon: error initializing graphdriver: driver not supported"
Jul 25 11:36:53 lenz systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jul 25 11:36:53 lenz systemd[1]: Unit docker.service entered failed state.

I am running docker 1.11.2-0~jessie

EDIT: I was able to get it to run again by running rm -rf /var/lib/docker/aufs and then start the docker service again

So after upgrading the kernel under Debian to 4.6 I am still stuck on the same step as before:

wsd-00020-05 00:02:46.762424 [ client_ws_0002 ] WOPI::CheckFileInfo header for URI [https://cloud..uk/apps/richdocuments/wopi/files/32?access_token=SHFfuiR1rzJw9HjDKP3FrIDkforxQTbb]:
Date: Sun, 24 Jul 2016 20:47:02 GMT / Server: Apache/2.4.18 (Ubuntu) / Strict-Transport-Security: max-age=15768000; includeSubDomains; preload / Expires: Thu, 19 Nov 1981 08:52:00 GMT / Cache-Control: no-cache, must-revalidate / Pragma: no-cache / Content-Security-Policy: default-src ‘none’;script-src ‘self’ ‘unsafe-eval’;style-src ‘self’ ‘unsafe-inline’;img-src ‘self’ data: blob:;font-src ‘self’;connect-src ‘self’;media-src ‘self’ / Content-Length: 32 / X-Content-Type-Options: nosniff / X-XSS-Protection: 1; mode=block / X-Robots-Tag: none / X-Frame-Options: SAMEORIGIN / X-Download-Options: noopen / X-Permitted-Cross-Domain-Policies: none / Content-Type: applica
tion/json; charset=utf-8 / Set-Cookie: nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict / Set-Cookie: nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax / Set-Cookie: oc_sessionPassphrase=qa3q2rujbYasXeyd7Xtz%2FE3ZFkjw4VRwMU00mJUWf%2FRfwP4HdjUPbtvflJvIcGXaimUj1dWZ5VbXGaJU7ghId1j3dvgvQRklJ7%2BqDsfvvLnkOwut6aw0YGBSu1kCH0iq; p
ath=/; secure; httponly / Set-Cookie: occ3bgzu13dp=b89bi7h3djt60hpbe5pvdqhn24; path=/; HttpOnly / Connection: close /
wsd-00020-05 00:02:46.762637 [ client_ws_0002 ] WOPI::CheckFileInfo returned: {“message”:“App is not enabled”}
wsd-00020-05 00:02:46.783261 [ client_ws_0002 ] ~DocumentBroker [https://cloud..uk/apps/richdocuments/wopi/files/32?access_token=SHFfuiR1rzJ
w9HjDKP3FrIDkforxQTbb] destroyed with 0 sessions left.
wsd-00020-05 00:02:46.787713 [ client_ws_0002 ] ~ChildProcess dtor [184].
kit-00184-00 00:02:45.275424 [ loolkit ] Connection closed.
wsd-00020-04 00:02:46.070602 [ client_ws_0001 ] ClientRequestHandler::handleRequest: BadRequestException: Invalid URI or access denied.

It is unclear to me why it states “App is not enabled”. When I check the URL in the first line manually I do get the following output:

{"BaseFileName":"New Spreadsheet.ods","Size":7130,"Version":"0"}

Does the “HttpOnly” element have any influence on it, since all communication is done via HTTPS?

After upgrading to kernel 4.6 i also changed the docker storage driver (from aufs to overlay).
And remember that if you change it you will lose al the images you have built.

I’m just wondering does the server have to be running on the same host as the client even if it’s on a different subdomain?

After upgrading to 4.6.0 and change the docker storage to overlay, it takes more time to show the error, but it end with it…

This is the logs:

wsd-00022-04 00:05:26.600183 [ client_ws_0004 ] Thread started.
wsd-00022-04 00:05:26.600504 [ client_ws_0004 ] Starting GET request handler for session [0004].
wsd-00022-04 00:05:26.600616 [ client_ws_0004 ] Sending to Client [statusindicator: find].
wsd-00022-04 00:05:26.600962 [ client_ws_0004 ] getNewChild: Have 8 children, forking 0
wsd-00022-04 00:05:26.601520 [ client_ws_0004 ] getNewChild: Returning new child [65].
wsd-00022-04 00:05:26.601628 [ client_ws_0004 ] New DocumentBroker for docKey [alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698].
wsd-00022-04 00:05:26.601743 [ client_ws_0004 ] DocumentBroker [https://alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698?access_token=QFfCiYcEX8UbtXlokuyodq8cwPGvQYzX] created. DocKey: [alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698]
wsd-00022-04 00:05:26.601908 [ client_ws_0004 ] Validating: https://alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698?access_token=QFfCiYcEX8UbtXlokuyodq8cwPGvQYzX
wsd-00022-04 00:05:26.602036 [ client_ws_0004 ] Public URI [https://alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698?access_token=QFfCiYcEX8UbtXlokuyodq8cwPGvQYzX] considered WOPI.
wsd-00022-04 00:05:26.602167 [ client_ws_0004 ] Storage ctor: https://alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698?access_token=QFfCiYcEX8UbtXlokuyodq8cwPGvQYzX
wsd-00022-04 00:05:26.602228 [ client_ws_0004 ] WopiStorage ctor with localStorePath: , jailPath: , uri: [https://alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698?access_token=QFfCiYcEX8UbtXlokuyodq8cwPGvQYzX].
wsd-00022-04 00:05:26.602296 [ client_ws_0004 ] Getting info for wopi uri [https://alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698?access_token=QFfCiYcEX8UbtXlokuyodq8cwPGvQYzX].
wsd-00022-10 00:05:27.211909 [ loolwsd ] Total memory used: 214684
wsd-00022-04 00:06:22.649295 [ client_ws_0004 ] ~DocumentBroker [https://alycloud.flo-art.fr/apps/richdocuments/wopi/files/148698?access_token=QFfCiYcEX8UbtXlokuyodq8cwPGvQYzX] destroyed with 0 sessions left.
wsd-00022-04 00:06:22.649448 [ client_ws_0004 ] ~ChildProcess dtor [65].
kit-00065-00 00:06:22.026152 [ loolkit ] Connection closed.
kit-00065-00 00:06:22.026292 [ loolkit ] SocketProcessor finishing. TerminationFlag: 0, n: 2, payload size: 2, flags: 88
kit-00065-00 00:06:22.026367 [ loolkit ] SocketProcessor finished.
kit-00065-00 00:06:22.026412 [ loolkit ] Removing ‘/lo’
kit-00065-00 00:06:22.244872 [ loolkit ] Removing ‘/user/docs/’
wsd-00022-00 00:06:22.868929 [ prison_ws ] Connection closed.
wsd-00022-00 00:06:22.869100 [ prison_ws ] SocketProcessor finishing. TerminationFlag: 0, n: 0, payload size: 0, flags: 0
wsd-00022-00 00:06:22.869312 [ prison_ws ] SocketProcessor finished.
wsd-00022-04 00:06:22.869607 [ client_ws_0004 ] Closing child [65].
wsd-00022-04 00:06:22.869769 [ client_ws_0004 ] ClientRequestHandler::handleRequest: BadRequestException: Invalid URI or access denied.
wsd-00022-04 00:06:22.869846 [ client_ws_0004 ] Thread finished.
kit-00065-00 00:06:23.245516 [ loolkit ] Process finished.
frk-00031-00 00:06:23.401214 [ loolforkit ] Child 65 has exited, removing its jail ‘/opt/lool/child-roots/65’
wsd-00022-10 00:06:27.470506 [ loolwsd ] Total memory used: 214472

Regarding the connection error: Seems that the root cause is simple:


Turns out that the browser wants to connect to localhost.
In other words: This might work in the case browser and docker container run on the same box.

@rainer this looks like you probably haven’t configured your external URL in the admin area of your NC installation.

Eventually, I got it running :slight_smile:

What I did: started the container with
docker run -t -d -p 127.0.0.1:9980:9980 -e "domain=cloud\.example\.com" --restart always --cap-add MKNOD collabora/code
In the Collabora configuration in Nextcloud, URL to Collabora Online server is https://cloud.example.com/ (thanks, @jurgenhaas!
I think that’s all.
No need for additional certificates, the installation guide is wrong here.
Of course, you need to replace cloud.example.com with the name of your own nextcloud server.
OS: OpenSUSE 13.2

Rainer

1 Like

About the save/apply button not working: disable the normal Documents app. The buttons clash (have the same id) so this has to be fixed in the code to work. @LukasReschke FYI I’ll create an issue.

So, I can’t get it to work either. My error:

wsd-BLA Poco::Net::DNS::resolveOne("cloud.josandcamila.com") failed: Host not found: cloud.josandcamila.com
wsd-BLA Poco::Net::IPAddress("cloud.josandcamila.com") failed: Invalid address: cloud.josandcamila.com
wsd-BLA WOPI host is not on the same host as the WOPI client: "". Connection is not allowed.
wsd-BLA No acceptable WOPI hosts found matching the target host [cloud.josandcamila.com] in config.
wsd-BLA ~DocumentBroker [https://cloud.josandcamila.com/apps/richdocuments/wopi/files/3610765?access_token=W7hLlzliRy7FYYY9BIqE3WTiBUoqgcMh] destroyed with 0 sessions left.
wsd-BLA ~ChildProcess dtor [34].
kit-00034-00 00:04:12.971798 [ loolkit ] Connection closed.

Earlier, I had this one:

 wsd-BLA WOPI host is not on the same host as the WOPI client: "192.168.1.107". Connection is not allowed.

Indeed, 192.168.1.107 is my server’s address on the local network but that shouldn’t matter I suppose…

@jospoortvliet Exactly what I had.
Resolution: make sure that your container has been started with -e "domain=cloud\.josandcamila\.com" - and the URL for the Collabora installation points to https://cloud.josandcamila.com/

1 Like

I got it working with the tips aboce. What is strange though it takes a while to establish the connection. When I open a documents it takes up to 20 seconds.

Oh you’re so correct, I have it working now! So the domain to start the docker container with has to be the URL you run Nextcloud on, NOT the URL you run Collabora Online on… whoah.

Thanks a bunch! Yay for document editing in my own Nextcloud :smiley:

It works so far in Debian 8. Starting the document takes a few seconds . How could you speed this up? And how can you update the Docker container?

1 Like

Thanks @rainer, that solved it for me, too!

Does anyone have any clues on how to get the Personal -> Collabora Online -> “Save new documents to” entry to save the input? I’ve tried “Documents” and “/Documents” and “Documents/” and “/Documents/” but it is always blank upon return. I’ve tried hitting enter after an entry. I’ve tried giving it lots of time before browsing away from the Personal settings page. Nothing seems to work.

My setup is where I have a dedicated Apache server in front of all my other VM’s. Is this a supported setup for Collabora? Since the guide state using 127.0.0.1 which means the apache doing the proxy is on the same machine. Which in my case isn’t valid since I have my Apache on a separate VM.

I have switched from devicemapper to overlay FS. But still get the error:

wsd-00022-04 00:01:02.766389 [ client_ws_0001 ] Getting info for wopi uri [https://cloud.wijman.me.uk/apps/richdocuments/wopi/files/349?access_token=IBiTRbdcEIWXbGM4cQ7SIX8ZclyYASxt].       
wsd-00022-04 00:01:03.399915 [ client_ws_0001 ] WOPI::CheckFileInfo header for URI [https://cloud.wijman.me.uk/apps/richdocuments/wopi/files/349?access_token=IBiTRbdcEIWXbGM4cQ7SIX8ZclyYASxt
]:                                                                                                                                                                                            
        Date: Tue, 26 Jul 2016 14:57:01 GMT /   Server: Apache/2.4.10 (Debian) /        Strict-Transport-Security: max-age=15768000; includeSubDomains; preload /       Expires: Thu, 19 Nov 1981 08:52:00 GMT /      Cache-Control: no-cache, must-revalidate /      Pragma: no-cache /      Content-Security-Policy: default-src 'none';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self' /         Content-Length: 32 /    X-Content-Type-Options: nosniff /       X-XSS-Protection: 1; mode=block /     X-Robots-Tag: none /    X-Frame-Options: SAMEORIGIN /   X-Download-Options: noopen /    X-Permitted-Cross-Domain-Policies: none /       Content-Type: application/json; charset=utf-8 /       Set-Cookie: nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict /     Set-Cookie: nc_sameSiteCookielax=true; path=/;
 httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax /         Set-Cookie: oc_sessionPassphrase=kWDyNJrOHWATEJ3%2BvEOzpjS9GEldaSQVZ1LjISYZO9wWpO68eXYMtUIxIsFckOuExPtPdlMshFc
XdLUynyGOj%2Fd5MBT%2FD7DEHS%2BknKbt9hwAzbSegCL4e3PihE%2BtaiBq; path=/; secure; httponly /       Set-Cookie: occ3bgzu13dp=i11pqoch7imcuf25m1934f8qo0; path=/; HttpOnly /         Connection: close /                                                                                                                                                                                         
wsd-00022-04 00:01:03.400140 [ client_ws_0001 ] WOPI::CheckFileInfo returned: {"message":"App is not enabled"}                                                                                
wsd-00022-04 00:01:03.402543 [ client_ws_0001 ] ~DocumentBroker [https://cloud.wijman.me.uk/apps/richdocuments/wopi/files/349?access_token=IBiTRbdcEIWXbGM4cQ7SIX8ZclyYASxt] destroyed with 0 
sessions left.                                                                                                                                                                                
wsd-00022-04 00:01:03.402673 [ client_ws_0001 ] ~ChildProcess dtor [85].                                                                                                                      
kit-00085-00 00:01:02.438822 [ loolkit ] Connection closed.                                                                                                                                   
kit-00085-00 00:01:02.439517 [ loolkit ] SocketProcessor finishing. TerminationFlag: 0, n: 2, payload size: 2, flags: 88                                                                      
kit-00085-00 00:01:02.440234 [ loolkit ] SocketProcessor finished.                                                                                                                            
kit-00085-00 00:01:02.440761 [ loolkit ] Removing '/lo'                                                                                                                                       
kit-00085-00 00:01:02.653301 [ loolkit ] Removing '/user/docs/'                                                                                                                               
wsd-00022-00 00:01:03.618652 [ prison_ws ] Connection closed.                                                                                                                                 
wsd-00022-00 00:01:03.619030 [ prison_ws ] SocketProcessor finishing. TerminationFlag: 0, n: 0, payload size: 0, flags: 0                                                                     
wsd-00022-00 00:01:03.619583 [ prison_ws ] SocketProcessor finished.                                                                                                                          
wsd-00022-04 00:01:03.621422 [ client_ws_0001 ] Closing child [85].                                                                                                                           
wsd-00022-04 00:01:03.622623 [ client_ws_0001 ] ClientRequestHandler::handleRequest: BadRequestException: Invalid URI or access denied.                                                       
wsd-00022-04 00:01:03.623547 [ client_ws_0001 ] Thread finished.                                                                                                                              
kit-00085-00 00:01:03.656822 [ loolkit ] Process finished.                                                                                                                                    
frk-00031-00 00:01:04.200227 [ loolforkit ] Child 85 has exited, removing its jail '/opt/lool/child-roots/85'

When I check the URL https://cloud.wijman.me.uk/apps/richdocuments/wopi/files/349?access_token=IBiTRbdcEIWXbGM4cQ7SIX8ZclyYASxt manually I get the response:

{“BaseFileName”:“New Spreadsheet.ods”,“Size”:7130,“Version”:“0”}

Interesting, it says the app isn’t enabled in the error log… But it is and properly configured otherwise it wouldn’t get the URL, I bet.

Sorry, I have no clue what’s broken :frowning:

I made a nice tutorial video showing how to install Collabora Online in Nextcloud. A big THANK YOU to everyone here as I wouldn’t have been able to do this without all of you!

Feedback super welcome!

1 Like

I’d add --restart always to the docker command line. That will make sure that the container starts with every reboot.

1 Like