Collabora + Nextcloud + Docker = Failure

Environment
Official docker image of Nextcloud, updated to v23.0.0 but failure was happening before update
Official docker image of Collabora CODE (latest)
Using Portainer to manage containers
NPM running in front of the docker containers
collabora.mydomain points to Collabora CODE container
nextcloud.mydomain points to Nextcloud
Both are https with a Let’s Encrypt certificate managed by NPM

Behavior
The most annoying behavior is that this worked flawlessly … and then it didn’t, with no configuration changes whatsoever.

Nextcloud works great. It is configured and operating properly.
In the Nextcloud settings, under Office, I have specified a separate Collabora server. For all of the following I see a green tick that the server is available.

If I click a document in Nextcloud, I receive the following error: “Document loading failed. Failed to load NextCloud Office - please try again later”

Collabora returns “OK” at the root of collabora.mydomain, but if I enter the Collabora admin, I receive the error that “Server has been shut down please reload the page.”

In the Collabora CODE logs, there are a couple of interesting entries, that appear to relate to a similar issue.

wsd-00001-00041 2021-12-06 20:42:17.498792 +0000 [ websrv_poll ] 
ERR  #24 Exception while processing incoming request: [GET 
/cool/https%3A%2F%2F{NEXTCLOUD.MYDOMAIN}%2Findex.php%2Fapps%2Frichdocuments
%2Fwopi%2Ffiles%2F2838_occv53kiq6gp%3Faccess_token%
{TOKEN}%26access_token_ttl%
{TTL}%26permission%3Dedit/ws?WOPISrc=https%3A%2F%2F{TRUNCATED
NEXTCLOUD.MYDOMAIN}...]: Invalid or unknown request.|
wsd/COOLWSD.cpp:{NUMERIC STRING}&compat=/ws HTTP/1.1

and

wsd-00001-00041 2021-12-06 20:47:09.652369 +0000 [ websrv_poll ] WRN  
convert-to: Requesting address is denied: ::ffff:{SUBNET GATEWAY IP ADDRESS}| 
wsd/COOLWSD.cpp:2593

(Forgive me if I’ve deleted irrelevant information, but I cannot tell what obfuscated information might contain proprietary data.)

This is pretty clearly a Collabora configuration issue, so I’m hesitant to even post the question in the Nextcloud forum. But this is an active, engaged community and I’m hoping someone has solved the same issue, particularly as this integration is clearly an out of the box feature now.

Attempted Troubleshooting

  1. Restarted the docker containers for Nextcloud and Collabora CODE in various orders
  2. Removed and pulled the Collabora CODE image
  3. Started the Collabora container from the command line with CLI options based on the documentation provided by Nextcloud, Collabora, and the community
  4. Tried both http and https access to the Collabora CODE server
  5. Updated Nextcloud
  6. Per this thread, I downloaded a working Collabora frontend. The behavior is different but still fails with a brief and very small error of “The server has been disconnected”. All other behavior is the same (including the green tick indicating availability).

Questions

  1. Is the “server shut down” issue related to the above issues
  2. How do I start the server if I have followed the configuration docs that do not indicate anything about starting the server

One specific question I have is that, if I need to edit a configuration file, where in the Collabora container is the file located?

Additional Information

ENV variables (Collabora CODE container):

domain: nextcloud\.mydomain # two slashes not showing here
DONT_GEN_SSL_CERT
extra_params: --o:ssl.enable=true
LC_CTYPE: C.UTF-8
password: {password}
PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
server_name: office.mydomain
username: {my username}

The url https://office.mydomain/hosting/discovery returns the XML namespace file.

At the moment there are lot of changing parts within Collabora integration… Collabora changed /loolwsd used for ages to /coolwsd which may require change in your reverse proxy configuration (was not the case for me with NC22+traefik)… additionally there seems to be an issue with the richdocuments app 5.0.0 as you referenced already (didn’t dig deeper if both is related).

this one is already a good sign - collabora seems to work.

My observation is Collabora container is pretty slow on start - if you perform any changes please wait 2-3 minutes before you start testing… When I upgraded my Collabora container last time I had the feeling I had to visit Nextcloud configuration page and tick “own server” again (maybe to make NC detect loowsd->coolwsd change). Check this post - NC22+traefik - but maybe it helps:

Ok I have a very similar setup (arm64):

  • NC23 running in docker container from latest image
  • Collabora running in its own container as well
  • Docker container with NPM managing domain redirection and SSL
  • Green tick on connection to server within NC UI
    I get the return from the XML namespace as well and similar errors in the logs of the collabora container when trying to open a document in NC. Impossible to have a working collabora (except with demo server).

What I tried : reading the freakin entire internet for clues, and tried various things. Nothing works yet. I tried NC 22, NC 23, collabora 4.2 or 5, NC installed within docker or from apt, various extra_params → same results.

I may need to look further on the NPM configuration but I don’t know much about NGINX. If anyone has a Docker{NC23+Collabora+NPM) configuration working on arm64, I would appreciate sharing for configuration tips (especially within NPM, which I’m not 100% sure).

I also use NPM for reverse proxying other docker containers which are reachable.