I’m using the latest docker image for Collabora and whenever I try to access a document from Nextcloud or access the Collabora admin panel I the following in the docker logs for the Collabora container:
wsd-00027-00035 15:22:35.166101 [ websrv_poll ] ERR Socket #20 SSL BIO error: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request (errno: Success)| ./net/SslSocket.hpp:273
wsd-00027-00035 15:22:35.166184 [ websrv_poll ] ERR Error while handling poll for socket #20 in websrv_poll: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request| ./net/Socket.hpp:474
The nextcloud log file shows this at the same time:
{"reqId":"6eMiK9X7EnshEIGDWMxw","level":3,"time":"2017-10-18T15:20:34+00:00","remoteAddr":"172.18.0.2","user":"<redacted>","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=201460&requesttoken=YlAK2j7fZJvmX7yH5R6shxSgkGNdwKj1xpHZd4LrLUA%3D%3AGyhk6H2xAdyQONC%2FtHj93kGTvyYZotqP8aCbObWtSCI%3D","message":"Exception: {\"Exception\":\"GuzzleHttp\\\\Exception\\\\ServerException\",\"Message\":\"Server error response [url] https:\\\/\\\/<redacted>\\\/hosting\\\/discovery [status code] 502 [reason phrase] Proxy Error\",\"Code\":502,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Subscriber\\\/HttpError.php(32): GuzzleHttp\\\\Exception\\\\RequestException::create(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Message\\\\Response))\\n#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Event\\\/Emitter.php(108): GuzzleHttp\\\\Subscriber\\\\HttpError->onComplete(Object(GuzzleHttp\\\\Event\\\\CompleteEvent), 'complete')\\n#2 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(91): GuzzleHttp\\\\Event\\\\Emitter->emit('complete', Object(GuzzleHttp\\\\Event\\\\CompleteEvent))\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#4 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/react\\\/promise\\\/src\\\/FulfilledPromise.php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#5 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Future\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#6 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\n#7 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(134): GuzzleHttp\\\\Message\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#8 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#9 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(125): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Http\\\/Client\\\/Client.php(138): GuzzleHttp\\\\Client->get('https:\\\/\\\/office....', Array)\\n#11 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/richdocuments\\\/lib\\\/WOPI\\\/DiscoveryManager.php(84): OC\\\\Http\\\\Client\\\\Client->get('https:\\\/\\\/office....')\\n#12 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/richdocuments\\\/lib\\\/WOPI\\\/Parser.php(41): OCA\\\\Richdocuments\\\\WOPI\\\\DiscoveryManager->get()\\n#13 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/richdocuments\\\/lib\\\/TokenManager.php(117): OCA\\\\Richdocuments\\\\WOPI\\\\Parser->getUrlSrc('application\\\/vnd...')\\n#14 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/richdocuments\\\/lib\\\/Controller\\\/DocumentController.php(168): OCA\\\\Richdocuments\\\\TokenManager->getToken(*** sensitive parameters replaced ***)\\n#15 [internal function]: OCA\\\\Richdocuments\\\\Controller\\\\DocumentController->index('201460')\\n#16 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(160): call_user_func_array(Array, Array)\\n#17 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(90): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Richdocuments\\\\Controller\\\\DocumentController), 'index')\\n#18 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(114): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Richdocuments\\\\Controller\\\\DocumentController), 'index')\\n#19 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Richdocumen...', 'index', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#20 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#21 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#22 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1004): OC\\\\Route\\\\Router->match('\\\/apps\\\/richdocum...')\\n#23 \\\/var\\\/www\\\/nextcloud\\\/index.php(48): OC::handleRequest()\\n#24 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Exception\\\/RequestException.php\",\"Line\":89}","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko\/20100101 Firefox\/56.0","version":"12.0.3.3"}
Nextcloud is working fine and my Apache proxy is working fine using SSL for everything else.
My virtualhost config is:
<VirtualHost *:80>
ServerName <redacted>
Redirect permanent / https://<redacted>/
</VirtualHost>
<VirtualHost *:443>
ServerName <redacted>
Include conf-available/ssl.conf
# Encoded slashes need to be allowed
AllowEncodedSlashes NoDecode
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
ProxyPreserveHost On
# static html, js, images, etc. served from loolwsd
# loleaflet is the client part of LibreOffice Online
ProxyPass /loleaflet http://office:9980/loleaflet retry=0
ProxyPassReverse /loleaflet http://office:9980/loleaflet
# WOPI discovery URL
ProxyPass /hosting/discovery http://office:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery http://office:9980/hosting/discovery
# Main websocket
ProxyPassMatch "/lool/(.*)/ws$" wss://office:9980/lool/$1/ws nocanon
# Admin Console websocket
ProxyPass /lool/adminws wss://office:9980/lool/adminws
# Download as, Fullscreen presentation and Image upload operations
ProxyPass /lool http://office:9980/lool
ProxyPassReverse /lool http://office:9980/lool
</VirtualHost>
office is the hostname of the Collabora container and is pingable from the proxy container. The docker-compose.yml is:
version: '2'
services:
office:
image: collabora/code
container_name: office
restart: always
expose:
- "9980"
volumes:
- ./site.conf:/etc/apache2/sites-available/<redacted>.conf
- ./site.conf:/etc/apache2/sites-enabled/<redacted>.conf
environment:
- domain=<redacted>
- server_name=<redacted>
- username=<redacted>
- password=<redacted>
networks:
- web
security_opt:
- seccomp:unconfined
cap_add:
- MKNOD
- SYS_CHROOT
- FOWNER
networks:
web:
external: true
Any ideas?
[edit] Addition point: the install guide talks about setting up a simple virtual host config file on the Collabora server itself in addition to the proxy config. This is the site.conf file in the docker-compose.yml. It is simply:
<VirtualHost *:9980>
ServerName <redacted>
</VirtualHost>
The proxy error log shows:
[Wed Oct 18 15:44:39.404658 2017] [proxy_http:error] [pid 81:tid 140580982023936] (20014)Internal error: [client 94.31.37.98:58511] AH01102: error reading status line from remote server office:9980
[Wed Oct 18 15:44:39.404697 2017] [proxy:error] [pid 81:tid 140580982023936] [client 94.31.37.98:58511] AH00898: Error reading from remote server returned by /loleaflet/dist/admin/admin.html