Problem with Collabora Online nginx setup

@icewind I am having the same problem that the application opens as described by archit3cct but then get the unexpected connection error.

The debug log shows:

It did create the (empty) file:

The discovery shows the XML output as described by lukas.

The only difference is that I made is with the docker command to start it, to point to a different IP and port number:
docker run -t -d -p 192.168.0.245:8082:9980 -e "domain=cloud\.nextcloud\.com" --cap-add MKNOD collabora/code
I would not expect that would be a real issue.

Below is a little diagram how I have set it up currently:

Traffic comes in from internet to the apache (proxy) server which translates several subdomains to the relevant VM’s. Both Nextcloud and Collabora are installed on the same VM but Collabora has the server IP address instead of localhost. This since Apache2 is running on a different VM.

When running the docker without -d I can see the following lines:

wsd-00020-03 00:00:59.652406 [ client_req_hdl ] Request from 192.168.0.241:34244: GET /lool/ws/https://cloud.mydomain.com/apps/richdocuments/wopi/files/539952?access_token=MmDqKhmaclv3bc6t3G
kcIix6JBuXVEpG HTTP/1.1 / Host: office.mydomain.com / Pragma: no-cache / Cache-Control: no-cache / Origin: https://office.mydomain.com / Sec-WebSocket-Version: 13 / DNT: 1 / User-Agent: Mozi
lla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 / Accept-Encoding: gzip, deflate, sdch, br / Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,
nl;q=0.4 / Sec-WebSocket-Key: Px+cnXf6eTLKB1uatw7XYA== / Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits / X-Forwarded-For: 192.168.0.1 / X-Forwarded-Host: office.mydomain.com / X-Forwarded-Server: office.mydomain.com / Upgrade: WebSocket / Connection: Upgrade

then few lines lower:

kit-00101-00 00:01:10.851174 [ loolkit ] link("/opt/collaboraoffice5.1/CREDITS.fodt","/opt/lool/child-roots/101/lo/CREDITS.fodt") failed. Exiting. (errno: Operation not permitted)           
frk-00029-00 00:01:11.471271 [ loolforkit ] Child 101 has exited, removing its jail '/opt/lool/child-roots/101'                                                                               
wsd-00020-03 00:01:15.757649 [ client_ws_0001 ] getNewChild: No live child, forking more.                                                                                                     
wsd-00020-03 00:01:15.757795 [ client_ws_0001 ] getNewChild: Timed out while waiting for new child.                                                                                           
wsd-00020-03 00:01:15.757865 [ client_ws_0001 ] Failed to get new child. Service Unavailable.                                                                                                 
wsd-00020-03 00:01:15.758209 [ client_ws_0001 ] ClientRequestHandler::handleRequest: WebSocketErrorMessageException: Service is unavailable. Please try again later and report to your adminis
trator if the issue persists.

I am bit unclear now how to tackle this issue.

Did you get it solved? I have a similar error I just can’t get rid off.

Hi, the same problem with loosing connection in the 2nd stage. The docker image output shows that main process has problem… it starts and ends again and again:

03:28:58.016812 [ loolforkit ] Child 12144 has exited, removing its jail '/opt/lool/child-roots/12144’
wsd-00020-00 03:29:03.206534 [ loolwsd ] MasterToForKit: spawn 1
wsd-00020-00 03:29:03.206581 [ loolwsd ] Writing to pipe. Data: [spawn 1].
frk-00029-00 03:29:03.013113 [ loolforkit ] readFIFO for pipe: wsd_pipe_rd returned: 8
frk-00029-00 03:29:03.013146 [ loolforkit ] Read line from pipe: wsd_pipe_rd, line: [spawn 1], data: [].
frk-00029-00 03:29:03.013155 [ loolforkit ] ForKit command: [spawn 1].
frk-00029-00 03:29:03.013171 [ loolforkit ] Spawning 1 child per request.
frk-00029-00 03:29:03.013179 [ loolforkit ] Creating 1 new child.
frk-00029-00 03:29:03.013187 [ loolforkit ] Forking a loolkit process.
frk-00029-00 03:29:03.015983 [ loolforkit ] Forked kit [12149].
kit-12149-00 03:29:03.016355 [ loolforkit ] Initializing kit
kit-12149-00 03:29:03.016421 [ loolforkit ] Log level is [8].
kit-12149-00 03:29:03.016470 [ loolkit ] Process started.
kit-12149-00 03:29:03.016562 [ loolkit ] Jail path: /opt/lool/child-roots/12149/
kit-12149-00 03:29:03.016764 [ loolkit ] symlink("…/lo","/opt/lool/child-roots/12149/opt/collaboraoffice5.1")
kit-12149-00 03:29:03.151557 [ loolkit ] link("/opt/collaboraoffice5.1/CREDITS.fodt","/opt/lool/child-roots/12149/lo/CREDITS.fodt") failed. Exiting. (errno: Operation not permitted)

This line started appearing in my docker logs

wsd-00020-03 00:14:40.957852 [ client_ws_0002 ] WOPI::CheckFileInfo returned: {“message”:“App is not enabled”}

I can confirm categorically that the App is indeed enabled. Could this be the root of my issues. I can successfully get the Collabora interface to load but it gives me the unknown error trying to open a file.

If I go directly to the office app I can see all my files infact for some really odd reason I can occasionally open some of them, it is however rare.

Any ideas??

In the hope that it would give better guidance on whats going wrong, Here is a complete excerpt of the logs where I try to open an XLS document and it fails

wsd-00020-02 00:22:10.021058 [ client_req_hdl ] Request from 192.168.100.55:36194: POST /loleaflet/1.7.2/loleaflet.html?WOPISrc=https%3A%2F%2Fcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F398742&title=ITB%20Payroll%20details.xls&lang=en-gb&closebutton=1&revisionhistory=1 HTTP/1.0 / Host: office.example.com / Connection: close / Content-Length: 45 / Cache-Control: max-age=0 / Origin: null / Upgrade-Insecure-Requests: 1 / User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 / Content-Type: application/x-www-form-urlencoded / Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 / Accept-Encoding: gzip, deflate, br / Accept-Language: en-US,en;q=0.8 / Cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; __zlcmid=bXfgg1k3LqhOSP
wsd-00020-02 00:22:10.021482 [ client_req_hdl ] Preprocessing file: /usr/share/loolwsd//loleaflet/dist/loleaflet.html
wsd-00020-03 00:22:10.336333 [ client_req_hdl ] Request from 192.168.100.55:36196: GET /lool/ws/https%3A%2F%2Fcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4 HTTP/1.0 / Upgrade: websocket / Connection: upgrade / Host: office.example.com / Pragma: no-cache / Cache-Control: no-cache / Origin: https://office.example.com / Sec-WebSocket-Version: 13 / User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 / Accept-Encoding: gzip, deflate, sdch, br / Accept-Language: en-US,en;q=0.8 / Cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; __zlcmid=bXfgg1k3LqhOSP / Sec-WebSocket-Key: kvPuuYuDJyN44Mbsc8wTdQ== / Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
wsd-00020-03 00:22:10.336674 [ client_ws_000a ] Thread started.
wsd-00020-03 00:22:10.336914 [ client_ws_000a ] Starting GET request handler for session [000a].
wsd-00020-03 00:22:10.337073 [ client_ws_000a ] Sending to Client [statusindicator: find].
wsd-00020-03 00:22:10.337284 [ client_ws_000a ] getNewChild: Have 5 children, forking 0
wsd-00020-03 00:22:10.337512 [ client_ws_000a ] getNewChild: Returning new child [44].
wsd-00020-03 00:22:10.337724 [ client_ws_000a ] New DocumentBroker for docKey [cloud.example.com/index.php/apps/richdocuments/wopi/files/398742].
wsd-00020-03 00:22:10.337891 [ client_ws_000a ] DocumentBroker [https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4] created. DocKey: [cloud.example.com/index.php/apps/richdocuments/wopi/files/398742]
wsd-00020-03 00:22:10.338058 [ client_ws_000a ] Validating: https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4
wsd-00020-03 00:22:10.338239 [ client_ws_000a ] Public URI [https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4] considered WOPI.
wsd-00020-03 00:22:10.338397 [ client_ws_000a ] Storage ctor: https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4
wsd-00020-03 00:22:10.338541 [ client_ws_000a ] WopiStorage ctor with localStorePath: , jailPath: , uri: [https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4].
wsd-00020-03 00:22:10.338684 [ client_ws_000a ] Getting info for wopi uri [https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4].
wsd-00020-03 00:22:10.389892 [ client_ws_000a ] WOPI::CheckFileInfo header for URI [https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4]:
Server: nginx/1.10.0 (Ubuntu) / Date: Fri, 12 Aug 2016 20:38:17 GMT / Content-Type: application/json; charset=utf-8 / Content-Length: 32 / Connection: close / X-Powered-By: PHP/5.5.9-1ubuntu4.17 / 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=u4kjS00VOSHKUnaD%2BjuHXnEcmgtwe9WW%2Bjxij0NHVdPc4%2BHRnxlKTJ4jOiG%2BQ9vZlNeDuYmZsnvHTsQqvvbfzLAkCtqwzdQorQRfIQ6d78wyhduquYXlnzqk8IGNkvgP; path=/; secure; httponly / Set-Cookie: oc787bc65a54=9mj3tte1eiph7166990g0lnc90; path=/; HttpOnly / 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’ / 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 /
wsd-00020-03 00:22:10.390813 [ client_ws_000a ] WOPI::CheckFileInfo returned: {“message”:“App is not enabled”}
wsd-00020-03 00:22:10.391252 [ client_ws_000a ] ~DocumentBroker [https://cloud.example.com/index.php/apps/richdocuments/wopi/files/398742?access_token=cEuC5LhtO9uf5MUa5UA4T1TDg3oibzL4] destroyed with 0 sessions left.
wsd-00020-03 00:22:10.391413 [ client_ws_000a ] ~ChildProcess dtor [44].
kit-00044-00 00:22:10.352726 [ loolkit ] Connection closed.
kit-00044-00 00:22:10.352984 [ loolkit ] SocketProcessor finishing. TerminationFlag: 0, n: 2, payload size: 2, flags: 88
kit-00044-00 00:22:10.353139 [ loolkit ] SocketProcessor finished.
kit-00044-00 00:22:10.353293 [ loolkit ] Removing ‘/lo’
kit-00044-00 00:22:10.743189 [ loolkit ] Removing ‘/user/docs/’
wsd-00020-00 00:22:10.782578 [ prison_ws ] Connection closed.
wsd-00020-00 00:22:10.782793 [ prison_ws ] SocketProcessor finishing. TerminationFlag: 0, n: 0, payload size: 0, flags: 0
wsd-00020-00 00:22:10.782967 [ prison_ws ] SocketProcessor finished.
wsd-00020-03 00:22:10.783200 [ client_ws_000a ] Closing child [44].
wsd-00020-03 00:22:10.783368 [ client_ws_000a ] ClientRequestHandler::handleRequest: BadRequestException: Invalid URI or access denied.
wsd-00020-03 00:22:10.783554 [ client_ws_000a ] Thread finished.
kit-00044-00 00:22:11.745298 [ loolkit ] Process finished.
frk-00029-00 00:22:11.897729 [ loolforkit ] Child 44 has exited, removing its jail ‘/opt/lool/child-roots/44’
wsd-00020-10 00:22:14.188226 [ loolwsd ] Total memory used: 169372

If anyone has any idea’s I’ve been battling with this since it was announced on nextcloud.com and it has my heart broke at this stage.

Regards,
Laoistom

Edit :

More errors crawling out of the wood work now.

wsd-00020-02 00:00:39.645093 [ client_ws_0001 ] ClientRequestHandler::handleRequest: WebSocketErrorMessageException: Service is unavailable. Please try again later and report to your administrator if the issue persists.

Looks like there is an issue with the websocket.

Hello im trying to open collabora this is my reverse proxy but dont work

server {
listen 443 ssl;
server_name hbloffice;

ssl_certificate /etc/nginx/ssl/hbloffice.crt;
ssl_certificate_key /etc/nginx/ssl/hbloffice.key;

# static files
location ^~ /loleaflet {
    proxy_pass https://10.6.0.1:9980;
    proxy_set_header Host $http_host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
    proxy_pass https://10.6.0.1:9980;
    proxy_set_header Host $http_host;
}

# websockets, download, presentation and image upload
location ^~ /lool {
    proxy_pass https://10.6.0.1:9980;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
}

}

iif i open the https://hbloffice only appers nginx page , and i need open the collabora what i can do thx for the help

Have a look at this: Collabora Docker capabilities problem. For me it solved similar issues I had.

Need Help Please?

I installed Nextcloud and its working fine on this domain name www.nextcloud-abc-def.org
but when I try to install docker on my ubuntu 16.0.4 with following command
udo docker run -t -d -p 127.0.0.1:9980:9980 -e ‘domain=nextcloud.abc-def.org’ --restart always --cap-add MKNOD collabora/code

I am getting following error:

docker: Error response from daemon: oci runtime error: process_linux.go:330: running prestart hook 0 caused “exit status 1: time=“2017-02-20T01:43:35-05:00” level=fatal msg=“failed to add interface vethd6f3252 to sandbox: failed to get link by name \“vethd6f3252\”: Link not found”\n”.

i guess you forgot to escape the characters in:

docker run -t -d -p 127.0.0.1:9980:9980 -e ‘domain=nextcloud.abc-def.org’ --restart always --cap-add MKNOD collabora/code

escape the dots with double-backslash instead:

docker run -t -d -p 127.0.0.1:9980:9980 -e ‘domain=nextcloud\\.abc-def\\.org’ --restart always --cap-add MKNOD collabora/code

ps: I even had to quad-escape the characters in here so the post would show the correct command :hushed: