# NextCloud (packages) with Collabora Office Docker - Document Loading Failed

**URL:** <https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666>\
**Category:** 📄 Office\
**Tags:** docker, collabora-online\
**Created:** [August 6, 2023, 6:05pm UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666 "2023-08-06T18:05:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kimimaru](https://help.nextcloud.com/letter_avatar/kimimaru/32/5_5575768a8748004e209b776fc1b2916d.png) [@Kimimaru](https://help.nextcloud.com/u/Kimimaru)\
**Post date:** [August 6, 2023, 6:05pm UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666/1 "2023-08-06T18:05:41Z")

</div>

| Nextcloud version _(eg, 26.0.1)_: | `25.0.9` |
| --- | --- |
| Operating system and version _(eg, Ubuntu 22.04)_: | `Ubuntu 20.04.6 LTS` |
| Apache or nginx version _(eg, Apache 2.4.25)_: | `Apache 2.4.41` |
| PHP version _(eg, 8.1)_: | `v7.4.3-4ubuntu2.19` |
| Database (sqlite or MariaDB or Postgres) | `mariadb Ver 15.1 Distrib 10.3.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2` |
| Docker (compose) | ✔ **(for Collabora)** |
| Snap | |
| Is this the first time you’ve seen this error? | yes |

## The issue you are facing:

- **Steps to replicate it:**

1. Click on an empty **Test.odt** file in my NextCloud.
2. See it attempting to load the document.
3. Receive an error message: **Document loading failed. Failed to load Nextcloud Office - please try again later**

- The output of your **Nextcloud log** in **Admin \> Logging** :

```auto
Nothing since loading the document.

```

- The output of your **config.php** file in `/path/to/nextcloud`\*\*  
(use `https://.../settings/admin/support` which auto-removes identifying information!):

```auto
{
    "passwordsalt": " ***REMOVED SENSITIVE VALUE***",
    "secret": " ***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "127.0.0.1",
        "tdd-dev.com",
        "www.tdd-dev.com",
        "office.tdd-dev.com"
    ],
    "datadirectory": " ***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "25.0.9.2",
    "overwrite.cli.url": "https:\/\/www.tdd-dev.com\/nextcloud",
    "dbname": " ***REMOVED SENSITIVE VALUE***",
    "dbhost": " ***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": " ***REMOVED SENSITIVE VALUE***",
    "dbpassword": " ***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": " ***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "theme": "",
    "loglevel": 2,
    "preview_max_x": 2048,
    "preview_max_y": 2048
}

```

- for Docker/Podman list environment variables ( run “`docker inspect {container name}`”)\*\*

```auto
[
    {
        "Id": "sha256:82805ced0ab84aba1a6a529adc054039a344a95b0e2a0963e72532ac3774970d",
        "RepoTags": [
            "collabora/code:latest"
        ],
        "RepoDigests": [
            "collabora/code@sha256:bed84146cb7c8ef52242f0ec3b2946fab7eb9ecf232943037cec50642652cf7f"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2023-07-25T17:13:31.525150727+01:00",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "",
        "Author": "Andras Timar <andras.timar@collabora.com>",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "100",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "9980/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LC_CTYPE=C.UTF-8"
            ],
            "Cmd": [
                "/start-collabora-online.sh"
            ],
            "ArgsEscaped": true,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 1353817537,
        "VirtualSize": 1353817537,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/a3bb7fa708d084f2d1fc8b2d120f456def3cadef7eaae2430f2c24a5fd90bf51/diff:/var/lib/docker/overlay2/62431ff6250295fda6c12055a59a439028959f5b2e3b3bb6047eb4fb9302ed67/diff:/var/lib/docker/overlay2/018d0a5454fd3d439bb2457153c64a57776b6dd69760c99d0df1e1117f50be0d/diff",
                "MergedDir": "/var/lib/docker/overlay2/99ad2973b27e4521550f85d859600ae7cd04bf39dfdbaae33e8daebd609985cf/merged",
                "UpperDir": "/var/lib/docker/overlay2/99ad2973b27e4521550f85d859600ae7cd04bf39dfdbaae33e8daebd609985cf/diff",
                "WorkDir": "/var/lib/docker/overlay2/99ad2973b27e4521550f85d859600ae7cd04bf39dfdbaae33e8daebd609985cf/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:34f03f266053c9ba13b3987460528e84beaa23b6415fc1b84d2beabbbab80516",
                "sha256:f0d882a6a5051f53ff9ae49477699030a8fffb5d2fa76752781d7e6911beb2d9",
                "sha256:4243af411027f3c7d019c80efc374ecdcd8056d999abb09d833f132460cb6e1a",
                "sha256:bde71a1c750720e7e443f764c6af9831de523c37574fdf096054c1bcfd658838"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

```

- The output of your Apache/nginx/system log in `/var/log/ ____ `:
- For Docker/Podman post STDOUT of the container (run `docker logs {container name}`)

**Docker**

```auto
 WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/DocumentBroker.cpp:2573
wsd-00001-00196 2023-08-06 17:50:05.348096 +0000 [docbroker_011] ERR Unauthorized Request while starting session on https%3A%2F%2Fwww.tdd-dev.com%3A443%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F16189_ocwvgtoha1a7 for socket #24. Terminating connection. Error: No acceptable WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/COOLWSD.cpp:5047
wsd-00001-00196 2023-08-06 17:50:05.351059 +0000 [docbroker_011] ERR #24: Error while handling poll at 1 in docbroker_011: #24 (write): unknown. BIO error: 167772367, rc: -1: error:0A0000CF:SSL routines::protocol is shutdown:
C0163CD1D27F0000:error:0A0000CF:SSL routines:ssl_write_internal:protocol is shutdown:ssl/ssl_lib.c:2034:
| net/Socket.cpp:464
wsd-00001-00196 2023-08-06 17:50:05.354646 +0000 [docbroker_011] ERR #19: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1122
wsd-00001-00196 2023-08-06 17:50:05.354895 +0000 [docbroker_011] WRN #19: Unassociated Kit (195) disconnected unexpectedly| wsd/COOLWSD.cpp:3497
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00031-00031 2023-08-06 17:50:05.485509 +0000 [forkit] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:524
wsd-00001-00204 2023-08-06 17:50:05.918940 +0000 [docbroker_012] ERR No acceptable WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/Storage.cpp:291
wsd-00001-00204 2023-08-06 17:50:05.919618 +0000 [docbroker_012] ERR loading document exception: No acceptable WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/DocumentBroker.cpp:2611
wsd-00001-00204 2023-08-06 17:50:05.919968 +0000 [docbroker_012] ERR Failed to add session to [https%3A%2F%2Fwww.tdd-dev.com%3A443%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F16189_ocwvgtoha1a7] with URI [https://www.tdd-dev.com/nextcloud/index.php/apps/richdocuments/wopi/files/16189_ocwvgtoha1a7?access_token=hfs7UfZ4LwDTOjqCzi2XkaigIzEQv5t3&access_token_ttl=1691380203000&permission=edit]: No acceptable WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/DocumentBroker.cpp:2573
wsd-00001-00204 2023-08-06 17:50:05.920260 +0000 [docbroker_012] ERR Unauthorized Request while starting session on https%3A%2F%2Fwww.tdd-dev.com%3A443%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F16189_ocwvgtoha1a7 for socket #24. Terminating connection. Error: No acceptable WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/COOLWSD.cpp:5047
wsd-00001-00204 2023-08-06 17:50:05.924685 +0000 [docbroker_012] ERR #24: Error while handling poll at 1 in docbroker_012: #24 (write): unknown. BIO error: 167772367, rc: -1: error:0A0000CF:SSL routines::protocol is shutdown:
C0163CD1D27F0000:error:0A0000CF:SSL routines:ssl_write_internal:protocol is shutdown:ssl/ssl_lib.c:2034:
| net/Socket.cpp:464
wsd-00001-00204 2023-08-06 17:50:05.930163 +0000 [docbroker_012] ERR #18: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1122
wsd-00001-00204 2023-08-06 17:50:05.930527 +0000 [docbroker_012] WRN #18: Unassociated Kit (203) disconnected unexpectedly| wsd/COOLWSD.cpp:3497
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00031-00031 2023-08-06 17:50:06.062486 +0000 [forkit] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:524
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
wsd-00001-00036 2023-08-06 17:50:30.004599 +0000 [websrv_poll] WRN convert-to: Requesting address is denied: 93.95.227.219| wsd/COOLWSD.cpp:3827
wsd-00001-00036 2023-08-06 17:51:00.016399 +0000 [websrv_poll] WRN convert-to: Requesting address is denied: 93.95.227.219| wsd/COOLWSD.cpp:3827
wsd-00001-00036 2023-08-06 17:51:29.276088 +0000 [websrv_poll] WRN convert-to: Requesting address is denied: 93.95.227.219| wsd/COOLWSD.cpp:3827
wsd-00001-00036 2023-08-06 17:51:30.175350 +0000 [websrv_poll] WRN convert-to: Requesting address is denied: 93.95.227.219| wsd/COOLWSD.cpp:3827
wsd-00001-00036 2023-08-06 17:51:30.393028 +0000 [websrv_poll] WRN convert-to: Requesting address is denied: 93.95.227.219| wsd/COOLWSD.cpp:3827

```

- errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors.

```auto
None

```

Some more context:

- NextCloud was installed via the [archive](https://download.nextcloud.com/server/releases/). It’s been upgraded over several versions starting from NC 21.
- I followed [this guide](https://collabora-online-for-nextcloud.readthedocs.io/en/latest/install/) for running Collabora Office in Docker. I have my own subdomain for the office suite, and NextCloud shows the green checkmark saying “Collabora Online server is reachable.”
- I followed every step [here](https://help.nextcloud.com/t/nextcloud-collabora-integration/151879). Everything looks all good - the admin panel is reachable and NC is discoverable from the Collabora docker and vice versa.
- My VM has 2 GB of RAM.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [August 6, 2023, 7:16pm UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666/2 "2023-08-06T19:16:26Z")

</div>

Hi Kimimaru, according to your testing it “should be OK”.

In your logs I see this

> [@Kimimaru](#):
>
> `Unauthorized Request while starting session on https%3A%2F%2Fwww.tdd-dev.com%3A443%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F16189_ocwvgtoha1a7 for socket #24. Terminating connection. Error: No acceptable WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/COOLWSD.cpp:5047`

it looks like CODE doesn’t accept Nextcloud server. (and I don’t see `aliasgroup`configured on your CODE container)

Look at this threads, likely it’s the same issue:

> [@No acceptable WOPI hosts found matching the target host \[pliki.tulcon.pl\] in config"](https://help.nextcloud.com/t/no-acceptable-wopi-hosts-found-matching-the-target-host-pliki-tulcon-pl-in-config/26009):
>
> After plugin NC collabora plugin update collabora stopped working with this error “No acceptable WOPI hosts found matching the target host [pliki.tulcon.pl] in config” docker run -t -d -p 127.0.0.1:9980:9980 -e ‘domain=pliki.tulcon.pl’ --restart always --cap-add MKNOD collabora/code Solution change to double quotes around domain solved the issue for me docker run -t -d -p 127.0.0.1:9980:9980 -e "domain=pliki.tulcon.pl" --restart always --cap-add MKNOD collabora/code

> [@Important changes regarding COOL/CODE docker versions from v21.11.3.6 on (multiple domains setup)](https://help.nextcloud.com/t/important-changes-regarding-cool-code-docker-versions-from-v21-11-3-6-on-multiple-domains-setup/137867/2):
>
> Many thanks for heads-up @JimmyKater: Just tested with current CODE image and it works as described (surprise - RTFM works!) excerpt from docker-compose.yaml file collabora: image: collabora/code:21.11.4.1.1 environment: # https://sdk.collaboraonline.com/docs/installation/CODE\_Docker\_image.html - aliasgroup1=${NEXTCLOUD1} - aliasgroup2=${NEXTCLOUD2} excerpt from .env file NEXTCLOUD1=https://nc.\<mydomain\>:443 NEXTCLOUD2=https://dev-nc.\<mydomain\>:443 both Nextcloud…

---

<div class="post-metadata">

**Author:** ![Kimimaru](https://help.nextcloud.com/letter_avatar/kimimaru/32/5_5575768a8748004e209b776fc1b2916d.png) [@Kimimaru](https://help.nextcloud.com/u/Kimimaru)\
**Post date:** [August 6, 2023, 8:51pm UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666/3 "2023-08-06T20:51:04Z")

</div>

Hi @wwe,

Thanks for your reply. I have set `aliasgroup1` to the subdomain and have used double quotes, but it still is not working. Should the `aliasgroup` be the NC domain or the Collabora Office subdomain?

More logs from docker:

```auto
 WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/DocumentBroker.cpp:2573
wsd-00001-00072 2023-08-06 20:46:05.455488 +0000 [docbroker_006] ERR Unauthorized Request while starting session on https%3A%2F%2Fwww.tdd-dev.com%3A443%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F16189_ocwvgtoha1a7 for socket #24. Terminating connection. Error: No acceptable WOPI hosts found matching the target host [www.tdd-dev.com] in config| wsd/COOLWSD.cpp:5047
wsd-00001-00072 2023-08-06 20:46:05.462031 +0000 [docbroker_006] ERR #24: Error while handling poll at 1 in docbroker_006: #24 (write): unknown. BIO error: 167772367, rc: -1: error:0A0000CF:SSL routines::protocol is shutdown:
C0E67F0BB97F0000:error:0A0000CF:SSL routines:ssl_write_internal:protocol is shutdown:ssl/ssl_lib.c:2034:
| net/Socket.cpp:464
wsd-00001-00072 2023-08-06 20:46:05.464062 +0000 [docbroker_006] ERR #18: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1122
wsd-00001-00072 2023-08-06 20:46:05.464351 +0000 [docbroker_006] WRN #18: Unassociated Kit (71) disconnected unexpectedly| wsd/COOLWSD.cpp:3497
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
frk-00031-00031 2023-08-06 20:46:05.594398 +0000 [forkit] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:524
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
wsd-00001-00036 2023-08-06 20:46:16.818003 +0000 [websrv_poll] WRN convert-to: Requesting address is denied: 93.95.227.219| wsd/COOLWSD.cpp:3827

```

What should the WOPI host be? I’ve read the documentation but I’m still very confused what I should be allowing. Should it only be the NC server? The IP address of the VPS? If I leave it empty, it still fails to load the document.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [August 7, 2023, 5:58am UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666/4 "2023-08-07T05:58:29Z")

</div>

see the second reference above. I’m not sure double quote are required in the new implementation…  
you have to add your Nextcloud URL there… looks in you case it is `www.tdd-dev.com` (wondering about`'www.` prefix but technically nothing wrong with it)

---

<div class="post-metadata">

**Author:** ![awelzel](https://help.nextcloud.com/user_avatar/help.nextcloud.com/awelzel/32/74585_2.png) [@awelzel](https://help.nextcloud.com/u/awelzel)\
**Post date:** [August 7, 2023, 9:40am UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666/5 "2023-08-07T09:40:15Z")

</div>

Did you update the option for “Allow list for WOPI requests” in the Nextcloud settings? It may help to add the IP network of Docker here if you run CODE behind a reverse proxy.

---

<div class="post-metadata">

**Author:** ![Kimimaru](https://help.nextcloud.com/letter_avatar/kimimaru/32/5_5575768a8748004e209b776fc1b2916d.png) [@Kimimaru](https://help.nextcloud.com/u/Kimimaru)\
**Post date:** [August 8, 2023, 6:49pm UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666/6 "2023-08-08T18:49:38Z")

</div>

Thanks everyone; I got it working!! It turns out I was specifying the docker container’s `aliasgroup1` with the URL it was hosted instead of the base domain alone (Ex. instead of “[https://example.com/nextcloud](https://example.com/nextcloud)” just “[example.com](http://example.com)”).

Then I followed @awelzel’s advice and obtained the Docker container’s IP address with:  
`docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id` and added it to the WOPI request list. Then it all worked and it’s running smoothly!

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 12:52pm UTC](https://help.nextcloud.com/t/nextcloud-packages-with-collabora-office-docker-document-loading-failed/167666/7 "2024-12-14T12:52:47Z")

</div>


