Document failed loading
Failed to load Nextcloud Office - please try again later
I am running a collabora/code docker container. I can “access” it via browser (see the OK
when navigating to either https:/local.ip or FQDN).
I see this issue popping up a lot when searching. I’ve of course tried numerous of the “solutions” found around the forum (e.g., this and this), as well as numerous different nginx configs I’ve found.
I’m on Nextcloud v23.0.2 (but had same issue on v.23.0.2), Nextcloud Office v 5.0.2. In my docker-compose.yaml
, I have:
version: '3.7'
services:
collabora:
image: collabora/code:latest
container_name: collabora
restart: unless-stopped
environment:
# - extra_params=o:ssl.enable=false
- extra_params=--o:ssl.enable=true
- domain=${COLLABORA_DOMAIN}
- password=${COLLABORA_PASSWORD}
- username=${COLLABORA_USERNAME}
- dictionaries="en_US da"
ports:
- "9980:9980"
volumes:
- ./appdata/collabora:/config
and in the .env
:
COLLABORA_USERNAME=admin
COLLABORA_PASSWORD=password
COLLABORA_DOMAIN=nextcloud\\.my\\.domain
where nextcloud\\.my\\.domain
is my fqdn to access nextcloud (double backlash escaped, as explained in all the examples I found).
In Nextcloud, under Admin-> Nextcloud Office, I have for the URL:
https://admin:password@collabora.my.domain
and it says Collabora Online server is reachable.
(I have also tried with local IP:port instead of FQDN, which also says “online” if I check “disable certificate verification”).
However, this has never worked with any of the nginx configs I have found online (e.g. this on collaboraonline.com), only if I used a minimal nginx config:
server {
listen 443 ssl;
root /config/www;
index index.html index.htm index.php;
server_name collabora.my.domain;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
proxy_pass https://10.0.30.21:9980;
}
}
with ssl.conf:
### Mozilla Recommendations
# generated 2020-06-17, Mozilla Guideline v5.4, nginx 1.18.0-r0, OpenSSL 1.1.1g-r0, intermediate configuration
# https://ssl-config.mozilla.org/#server=nginx&version=1.18.0-r0&config=intermediate&openssl=1.1.1g-r0&guideline=5.4
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off;
# intermediate configuration
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
# OCSP stapling
ssl_stapling on;
ssl_stapling_verify on;
### Linuxserver.io Defaults
# Certificates
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /config/keys/letsencrypt/fullchain.pem;
# Diffie-Hellman Parameters
ssl_dhparam /config/nginx/dhparams.pem;
# Enable TLS 1.3 early data
ssl_early_data on;
# HSTS, remove # from the line below to enable HSTS
#add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
# Optional additional headers
#add_header Cache-Control "no-transform" always;
#add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'";
#add_header Permissions-Policy "interest-cohort=()";
#add_header Referrer-Policy "same-origin" always;
#add_header X-Content-Type-Options "nosniff" always;
#add_header X-Frame-Options "SAMEORIGIN" always;
#add_header X-UA-Compatible "IE=Edge" always;
#add_header X-XSS-Protection "1; mode=block" always;
and proxy.conf:
# Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
# Proxy Connection Settings
proxy_buffers 32 4k;
proxy_connect_timeout 240;
proxy_headers_hash_bucket_size 128;
proxy_headers_hash_max_size 1024;
proxy_http_version 1.1;
proxy_read_timeout 240;
proxy_redirect http:// $scheme://;
proxy_send_timeout 240;
# Proxy Cache and Cookie Settings
proxy_cache_bypass $cookie_session;
#proxy_cookie_path / "/; Secure"; # enable at your own risk, may break certain apps
proxy_no_cache $cookie_session;
# Proxy Header Settings
proxy_set_header Connection $connection_upgrade;
proxy_set_header Early-Data $ssl_early_data;
proxy_set_header Host $host;
proxy_set_header Proxy "";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Real-IP $remote_addr;
After starting collabora container, if I try opening a document in Nextcloud, a docker logs collabora
shows (this is everything after Ready to accept connections on port 9980.
):
wsd-00001-00049 2022-02-19 13:33:49.085671 +0000 [ websrv_poll ] ERR Skipping the token [--co-image-logo=url('/core/img/logo/logo.png?v=0')] since it has more than one '=' pair| wsd/FileServerUtil.cpp:156
wsd-00001-00051 2022-02-19 13:33:49.645343 +0000 [ docbroker_001 ] WRN Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:722
wsd-00001-00051 2022-02-19 13:33:49.645425 +0000 [ docbroker_001 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00051 2022-02-19 13:33:49.645470 +0000 [ docbroker_001 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00051 2022-02-19 13:33:49.645492 +0000 [ docbroker_001 ] ERR #29: Socket read returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1125
wsd-00001-00051 2022-02-19 13:33:49.645534 +0000 [ docbroker_001 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00051 2022-02-19 13:33:49.645567 +0000 [ docbroker_001 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00051 2022-02-19 13:33:49.645606 +0000 [ docbroker_001 ] ERR #29: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1398
wsd-00001-00051 2022-02-19 13:33:49.645642 +0000 [ docbroker_001 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00051 2022-02-19 13:33:49.645669 +0000 [ docbroker_001 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00051 2022-02-19 13:33:49.645692 +0000 [ docbroker_001 ] ERR #29: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1398
wsd-00001-00051 2022-02-19 13:33:49.645761 +0000 [ docbroker_001 ] ERR WOPI::CheckFileInfo failed for URI [https://next.aephir.net/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj?access_token=a2n6SPD8RsI35It4tLo3Q0CkNkFGKWAD&access_token_ttl=0]: 0 . Headers: Body: []| wsd/Storage.cpp:690
wsd-00001-00051 2022-02-19 13:33:49.645881 +0000 [ docbroker_001 ] ERR loading document exception: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2014
wsd-00001-00051 2022-02-19 13:33:49.645931 +0000 [ docbroker_001 ] ERR Failed to add session to [/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj] with URI [https://next.aephir.net/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj?access_token=a2n6SPD8RsI35It4tLo3Q0CkNkFGKWAD&access_token_ttl=0]: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:1976
wsd-00001-00051 2022-02-19 13:33:49.645978 +0000 [ docbroker_001 ] ERR Storage error while starting session on /index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj for socket #24. Terminating connection. Error: WOPI::CheckFileInfo failed: | wsd/COOLWSD.cpp:3694
wsd-00001-00051 2022-02-19 13:33:49.646216 +0000 [ docbroker_001 ] WRN Ignoring attempted read from 24| ./net/Socket.hpp:1099
wsd-00001-00051 2022-02-19 13:33:49.646246 +0000 [ docbroker_001 ] ERR Invalid or unknown session [003] to remove.| wsd/DocumentBroker.cpp:2054
wsd-00001-00049 2022-02-19 13:33:50.062875 +0000 [ websrv_poll ] WRN DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj] that is marked to be destroyed. Rejecting client request.| wsd/COOLWSD.cpp:2281
wsd-00001-00049 2022-02-19 13:33:50.063104 +0000 [ websrv_poll ] ERR Error while handling Client WS Request: Failed to create DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj].| wsd/COOLWSD.cpp:3724
wsd-00001-00049 2022-02-19 13:33:50.063145 +0000 [ websrv_poll ] ERR #28: Socket write returned -1 (ENOENT: No such file or directory)| ./net/Socket.hpp:1398
wsd-00001-00049 2022-02-19 13:33:50.063184 +0000 [ websrv_poll ] ERR #28: Socket write returned -1 (ENOENT: No such file or directory)| ./net/Socket.hpp:1398
wsd-00001-00049 2022-02-19 13:33:50.063216 +0000 [ websrv_poll ] WRN Socket #28 is shutting down but 64 bytes couldn't be flushed and still remain in the output buffer.| ./net/WebSocketHandler.hpp:795
wsd-00001-00049 2022-02-19 13:33:50.063299 +0000 [ websrv_poll ] ERR #28: attempted to remove: 1042 which is > size: 0 clamped to 0| ./net/Socket.hpp:1214
wsd-00001-00049 2022-02-19 13:33:50.063344 +0000 [ websrv_poll ] WRN Ignoring attempted read from 28| ./net/Socket.hpp:1099
wsd-00001-00049 2022-02-19 13:33:50.063414 +0000 [ websrv_poll ] ERR Socket #28 SSL BIO error: error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown (ENOENT: No such file or directory)| ./net/SslSocket.hpp:348
wsd-00001-00049 2022-02-19 13:33:50.063495 +0000 [ websrv_poll ] ERR Error while handling poll for socket #28 at 0 in websrv_poll: error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown| net/Socket.cpp:465
wsd-00001-00049 2022-02-19 13:33:50.932260 +0000 [ websrv_poll ] WRN DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj] that is marked to be destroyed. Rejecting client request.| wsd/COOLWSD.cpp:2281
wsd-00001-00049 2022-02-19 13:33:50.932528 +0000 [ websrv_poll ] ERR Error while handling Client WS Request: Failed to create DocBroker with docKey [/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj].| wsd/COOLWSD.cpp:3724
wsd-00001-00049 2022-02-19 13:33:50.932585 +0000 [ websrv_poll ] ERR #28: Socket write returned -1 (ENOENT: No such file or directory)| ./net/Socket.hpp:1398
wsd-00001-00049 2022-02-19 13:33:50.932636 +0000 [ websrv_poll ] ERR #28: Socket write returned -1 (ENOENT: No such file or directory)| ./net/Socket.hpp:1398
wsd-00001-00049 2022-02-19 13:33:50.932687 +0000 [ websrv_poll ] WRN Socket #28 is shutting down but 64 bytes couldn't be flushed and still remain in the output buffer.| ./net/WebSocketHandler.hpp:795
wsd-00001-00049 2022-02-19 13:33:50.932735 +0000 [ websrv_poll ] ERR #28: attempted to remove: 1042 which is > size: 0 clamped to 0| ./net/Socket.hpp:1214
wsd-00001-00049 2022-02-19 13:33:50.932781 +0000 [ websrv_poll ] WRN Ignoring attempted read from 28| ./net/Socket.hpp:1099
wsd-00001-00049 2022-02-19 13:33:50.932833 +0000 [ websrv_poll ] ERR Socket #28 SSL BIO error: error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown (ENOENT: No such file or directory)| ./net/SslSocket.hpp:348
wsd-00001-00049 2022-02-19 13:33:50.932892 +0000 [ websrv_poll ] ERR Error while handling poll for socket #28 at 0 in websrv_poll: error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown| net/Socket.cpp:465
wsd-00001-00044 2022-02-19 13:33:51.646688 +0000 [ prisoner_poll ] WRN Prisoner connection disconnected but without valid socket.| wsd/COOLWSD.cpp:2368
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00045-00045 2022-02-19 13:33:52.664936 +0000 [ forkit ] ERR Failed to unmount [/opt/cool/child-roots/AxyNjf9de8Z3w9Lu/tmp]| common/JailUtil.cpp:70
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00045-00045 2022-02-19 13:33:52.681502 +0000 [ forkit ] ERR Failed to unmount [/opt/cool/child-roots/AxyNjf9de8Z3w9Lu/lo]| common/JailUtil.cpp:70
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00045-00045 2022-02-19 13:33:52.696575 +0000 [ forkit ] ERR Failed to unmount [/opt/cool/child-roots/AxyNjf9de8Z3w9Lu]| common/JailUtil.cpp:70
wsd-00001-00059 2022-02-19 13:33:53.943662 +0000 [ docbroker_002 ] WRN Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:722
wsd-00001-00059 2022-02-19 13:33:53.943769 +0000 [ docbroker_002 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00059 2022-02-19 13:33:53.943819 +0000 [ docbroker_002 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00059 2022-02-19 13:33:53.943848 +0000 [ docbroker_002 ] ERR #29: Socket read returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1125
wsd-00001-00059 2022-02-19 13:33:53.943888 +0000 [ docbroker_002 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00059 2022-02-19 13:33:53.943922 +0000 [ docbroker_002 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00059 2022-02-19 13:33:53.943949 +0000 [ docbroker_002 ] ERR #29: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1398
wsd-00001-00059 2022-02-19 13:33:53.943981 +0000 [ docbroker_002 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00059 2022-02-19 13:33:53.944015 +0000 [ docbroker_002 ] ERR Socket #29 SSL error: SYSCALL (5) (EPIPE: Broken pipe)| ./net/SslSocket.hpp:279
wsd-00001-00059 2022-02-19 13:33:53.944045 +0000 [ docbroker_002 ] ERR #29: Socket write returned -1 (EPIPE: Broken pipe)| ./net/Socket.hpp:1398
wsd-00001-00059 2022-02-19 13:33:53.944132 +0000 [ docbroker_002 ] ERR WOPI::CheckFileInfo failed for URI [https://next.aephir.net/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj?access_token=a2n6SPD8RsI35It4tLo3Q0CkNkFGKWAD&access_token_ttl=0&permission=edit]: 0 . Headers: Body: []| wsd/Storage.cpp:690
wsd-00001-00059 2022-02-19 13:33:53.944252 +0000 [ docbroker_002 ] ERR loading document exception: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2014
wsd-00001-00059 2022-02-19 13:33:53.944304 +0000 [ docbroker_002 ] ERR Failed to add session to [/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj] with URI [https://next.aephir.net/index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj?access_token=a2n6SPD8RsI35It4tLo3Q0CkNkFGKWAD&access_token_ttl=0&permission=edit]: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:1976
wsd-00001-00059 2022-02-19 13:33:53.944356 +0000 [ docbroker_002 ] ERR Storage error while starting session on /index.php/apps/richdocuments/wopi/files/82229_oc3z0uht4lmj for socket #20. Terminating connection. Error: WOPI::CheckFileInfo failed: | wsd/COOLWSD.cpp:3694
wsd-00001-00059 2022-02-19 13:33:53.944614 +0000 [ docbroker_002 ] WRN Ignoring attempted read from 20| ./net/Socket.hpp:1099
wsd-00001-00059 2022-02-19 13:33:53.944652 +0000 [ docbroker_002 ] ERR Invalid or unknown session [007] to remove.| wsd/DocumentBroker.cpp:2054
wsd-00001-00044 2022-02-19 13:33:55.945066 +0000 [ prisoner_poll ] WRN Prisoner connection disconnected but without valid socket.| wsd/COOLWSD.cpp:2368
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00045-00045 2022-02-19 13:33:56.960611 +0000 [ forkit ] ERR Failed to unmount [/opt/cool/child-roots/46wnvuGrG4FB9Gut/tmp]| common/JailUtil.cpp:70
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00045-00045 2022-02-19 13:33:56.976126 +0000 [ forkit ] ERR Failed to unmount [/opt/cool/child-roots/46wnvuGrG4FB9Gut/lo]| common/JailUtil.cpp:70
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00045-00045 2022-02-19 13:33:56.989634 +0000 [ forkit ] ERR Failed to unmount [/opt/cool/child-roots/46wnvuGrG4FB9Gut]| common/JailUtil.cpp:70
Since I have tried pretty much everything a I could find with a search engine (or on these forums), I’d really appreciate if anyone has any pointers. Preferably, I’d just want to use local IP instead of FQDN, but mostly, I’d just want to find a working config.