Collabora Office - Apache Proxy Error

Hey guys,

need help! if anyone encountered these errors! unsure if the are related. but I cant get collabora office to work with my nextcloud instance.

I have same apache config as mentioned in official Nextcloud collaboraoffice page.

Error:
Well, this is embarrassing, we cannot connect to your document, pleas try again.

Setup
WAF/Proxy (not blocking , monitor mode only) - > Apache

Apache Logs
x.x.x.x = WAF/Proxy IP
some.domain.com = my collabora office domain

[Tue Nov 08 10:09:36.617066 2016] [ssl:info] [pid 4300:tid 140442968983296] [client x.x.x.x:x] AH01964: Connection to child 67 established (server some.domain.com:443)
[Tue Nov 08 10:09:36.617230 2016] [ssl:debug] [pid 4300:tid 140442968983296] ssl_engine_kernel.c(2096): [client x.x.x.x:x] AH02043: SSL virtual host for servername some.domain.com found
[Tue Nov 08 10:09:36.620128 2016] [ssl:debug] [pid 4300:tid 140442968983296] ssl_engine_kernel.c(2023): [client x.x.x.x:x] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
[Tue Nov 08 10:09:36.620256 2016] [ssl:debug] [pid 4300:tid 140442968983296] ssl_engine_kernel.c(354): [client 2x.x.x.x:x] AH02034: Initial (No.1) HTTPS request received for child 67 (server some.domain.com:443)
[Tue Nov 08 10:09:36.620288 2016] [authz_core:debug] [pid 4300:tid 140442968983296] mod_authz_core.c(835): [client x.x.x.x:x] AH01628: authorization result: granted (no directives)
[Tue Nov 08 10:09:36.620305 2016] [proxy:debug] [pid 4300:tid 140442968983296] mod_proxy.c(1160): [client x.x.x.x:x] AH01143: Running scheme wss handler (attempt 0)
[Tue Nov 08 10:09:36.620308 2016] [proxy_http:debug] [pid 4300:tid 140442968983296] mod_proxy_http.c(1943): [client x.x.x.x:x] AH01113: HTTP: declining URL wss://127.0.0.1:9980/lool/https%253A%252F%252Fsome.domain.com%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F324143%3Faccess_token=5qIDxafasfBp9kveZySRy06Ahy8ZF1Y&permission=edit/ws
[Tue Nov 08 10:09:36.620310 2016] [proxy_wstunnel:debug] [pid 4300:tid 140442968983296] mod_proxy_wstunnel.c(341): [client x.x.x.x:x] AH02900: declining URL wss://127.0.0.1:9980/lool/https%253A%252F%252Fcloud.domain.com%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F324143%3Faccess_token=5qIDxscavvsv9kveZySRy06Ahy8ZF1Y&permission=edit/ws (not WebSocket)
[Tue Nov 08 10:09:36.620312 2016] [proxy:warn] [pid 4300:tid 140442968983296] [client x.x.x.x:x] AH01144: No protocol handler was valid for the URL /lool/https%3A%2F%2Fcloud.domain.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F324143?access_token=5qIDxxZGkdEBp9kvdvadvdssy06Ahy8ZF1Y&permission=edit/ws. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
[Tue Nov 08 10:09:36.620374 2016] [ssl:debug] [pid 4300:tid 140442968983296] ssl_engine_io.c(1016): [client x.x.x.x:x] AH02001: Connection closed to child 67 with standard shutdown (server some.domain.com:443)

There are no Docker logs that would indicate any error/ No logs otherwise either, just this
Docker Logs

`Generating RSA private key, 2048 bit long modulus

…+++
…+++
e is 65537 (0x10001)
Generating RSA private key, 2048 bit long modulus
…+++
…+++
e is 65537 (0x10001)
Signature ok
subject=/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=localhost
Getting CA Private Key
loolwsd version details: 1.9.6 - 1.9.6
loolforkit version details: 1.9.6 - 1.9.6
office version details: { “ProductName”: “Collabora Office”, “ProductVersion”: “5.1”, “ProductExtension”: “.10.11”, “BuildId”: “7512f1e1867672c06d987a94edb07f0a7ea0fc1e” }`

Nextcloud Logs:

Browser Console is breaking/giving error at below

500 GET ws

looks like websocket is breaking somewhere, as evident from apache logs and browser console. not sure where to go from here.

Thanks for the help!

any suggestions on how to deal with this problem?

Did you make sure, you have all needed Apache2 mods installed and enabled? I had the same problem with similar apache errors in error.log and it turned out, I hadn’t enabled proxy_wstunnel.
sudo a2enmod proxy_wstunnel fixed the problem.
The needed mods are proxy, proxy_wstunnel, proxy_http, and ssl as per this website: https://www.collaboraoffice.com/code/

Hope this helps.

2 Likes