I do have an issue with Docker and Collabora. Your help is very appreciated as I invested already a big bunch of time into it. Thanks already in advance for looking into my issue and your hints how to get collabora running.
I run an Odroid-XU4 with Ubuntu 16.04.4 LTS (GNU/Linux 4.14.47-132 armv7l) with Nextcloud 13.0.4.
I tried to install Collabora on the same Odroid to boost up my Nextcloud functionality, unfortunately without success.
I always get a “Internal Server Error” when trying to open a document in Nextcloud:
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
Technical details
Remote Address: xx.xx.xx.xx
Request ID: XXXXXXXXXXXXXXXXX
The installation was done basically according https://nextcloud.com/collaboraonline/, but I tried to modify a few things as it was not working.
I tried to install docker from two different sources, but I wasn’t successful with both packages:
Package docker.io
Package docker-ce as I suspected that docker.io maybe not fit to my hardware (armhf).
sudo curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=armhf] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce
sudo docker pull collabora/code
sudo docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=cloud\\.example\\.com' --restart always --cap-add MKNOD collabora/code
The hello-world docker container seems to work.
I also tried different ways for the storage driver:
- Without change
- Edit the file /etc/systemd/system/docker.service and replace ExecStart=/usr/bin/dockerd -H fd:// with ExecStart=/usr/bin/dockerd --storage-driver=overlay2 -H fd://
according https://fribeiro.org/tech/2018/02/13/collabora-docker-nextcloud/ - Create a new file under this directory:
sudo nano /etc/systemd/system/docker.service.d/DeviceMapper.conf
Paste the following text into the file:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --storage-driver=devicemapper -H fd://
According https://www.linuxbabe.com/cloud-storage/integrate-collabora-online-server-nextcloud-ubuntu-16-04
The log of nextcloud says the following:
Error GuzzleHttp\Exception\ServerException: Server error response [url] https://office.domain.tld/hosting/discovery [status code] 503 [reason phrase] Service Unavailable
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/Subscriber/HttpError.php - line 32: GuzzleHttp\Exception\RequestException create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/Event/Emitter.php - line 108: GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete')
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 91: GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent))
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 132: GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
/var/www/cloudsub.domain.tld/3rdparty/react/promise/src/FulfilledPromise.php - line 25: GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(*** sensitive parameters replaced ***)
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php - line 55: React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/Message/FutureResponse.php - line 43: GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 134: GuzzleHttp\Message\FutureResponse proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/Client.php - line 165: GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
/var/www/cloudsub.domain.tld/3rdparty/guzzlehttp/guzzle/src/Client.php - line 125: GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
/var/www/cloudsub.domain.tld/lib/private/Http/Client/Client.php - line 138: GuzzleHttp\Client->get('https //office....', Array)
/var/www/cloudsub.domain.tld/apps/richdocuments/lib/WOPI/DiscoveryManager.php - line 84: OC\Http\Client\Client->get('https //office....')
/var/www/cloudsub.domain.tld/apps/richdocuments/lib/WOPI/Parser.php - line 41: OCA\Richdocuments\WOPI\DiscoveryManager->get()
/var/www/cloudsub.domain.tld/apps/richdocuments/lib/TokenManager.php - line 148: OCA\Richdocuments\WOPI\Parser->getUrlSrc('application/vnd...')
/var/www/cloudsub.domain.tld/apps/richdocuments/lib/Controller/DocumentController.php - line 168: OCA\Richdocuments\TokenManager->getToken(*** sensitive parameters replaced ***)
[internal function] OCA\Richdocuments\Controller\DocumentController->index('9')
/var/www/cloudsub.domain.tld/lib/private/AppFramework/Http/Dispatcher.php - line 161: call_user_func_array(Array, Array)
/var/www/cloudsub.domain.tld/lib/private/AppFramework/Http/Dispatcher.php - line 91: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Richdocuments\Controller\DocumentController), 'index')
/var/www/cloudsub.domain.tld/lib/private/AppFramework/App.php - line 115: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Richdocuments\Controller\DocumentController), 'index')
/var/www/cloudsub.domain.tld/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('OCA\\Richdocumen...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
/var/www/cloudsub.domain.tld/lib/private/Route/Router.php - line 297: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
/var/www/cloudsub.domain.tld/lib/base.php - line 999: OC\Route\Router->match('/apps/richdocum...')
/var/www/cloudsub.domain.tld/index.php - line 42: OC handleRequest()
{main}
The kernel seems to be ready for docker, but I checked with lxc-checkconf, as recommended in an older discussion on: https://forum.odroid.com/viewtopic.php?f=98&t=6638#p52786. It looks fine according my understanding:
user@odroidxu4:~$ lxc-checkconfig
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Warning: newuidmap is not setuid-root
Warning: newgidmap is not setuid-root
Network namespace: enabled
--- Control groups ---
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
Bridges: enabled
Advanced netfilter: enabled
CONFIG_NF_NAT_IPV4: enabled
CONFIG_NF_NAT_IPV6: enabled
CONFIG_IP_NF_TARGET_MASQUERADE: enabled
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled
FUSE (for use with lxcfs): enabled
--- Checkpoint/Restore ---
checkpoint restore: missing
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: enabled
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: enabled
CONFIG_NETLINK_DIAG: enabled
File capabilities: enabled
Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
The docker log gives a long list with the same line:
sudo docker logs containerID
standard_init_linux.go:190: exec user process caused "exec format error"
standard_init_linux.go:190: exec user process caused "exec format error"
…
standard_init_linux.go:190: exec user process caused "exec format error"
I think also my virtual host .conf for the office.domain.tld on apache2 is setup correctly:
<VirtualHost *:443>
ServerName office.domain.tld:443
# SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/office.domain.tld/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/office.domain.tld/privkey.pem
# Encoded slashes need to be allowed
AllowEncodedSlashes NoDecode
# 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
ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
# 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
</VirtualHost>
I also switched off the firewall, but even without it, collabora is not working.