Enabling Collabora CODE app causes a lot of errors in the log

I’m setting up a Nextcloud server for my family. I’m pretty new to Linux and server admin stuff so I’d like some help.

I’ve installed the Collabora CODE app and it seems to work okay (I can open documents, at least) but I get regular errors in my Nextcloud log with it enabled. All of the errors seem to be related to Collabora in some way - if I disable the app, the errors stop occurring.

Here’s an example of the most common error:

[richdocuments] Error: Failed to fetch the Collabora capabilities endpoint: Client error: `GET http://[ip hidden by me]/nextcloud/apps/richdocumentscode_arm64/proxy.php?req=/hosting/capabilities` resulted in a `404 Not Found` response:
<!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="en" data-locale="en" translate="no" >

	from ? by -- at Feb 14, 2024, 3:36:28 PM

I’m unsure how to view the rest of the error. Also, two other errors occasionally appear:

[text] Error: No permission to access this file
	PUT /index.php/apps/text/session/47/create
	from [ip hidden by me] by genderneutralnoun at Feb 14, 2024, 1:56:10 PM

As well as:

[PHP] Error: Trying to access array offset on value of type null at /var/www/html/nextcloud/apps/richdocuments/lib/Service/DiscoveryService.php#152
	POST /index.php/apps/richdocuments/token
	from [ip hidden by me] by charizard at Feb 14, 2024, 1:55:10 PM

genderneutralnoun is my username on nextcloud, and charizard is the name of the admin account I have separated from my personal account on nextcloud. (There aren’t any other accounts on that nextcloud server currently.) charizard is also the name of the admin user on the server that I’m hosting nextcloud on.

I installed Nextcloud as version 28 originally then updated it to 28.0.2. It’s running on a Ubuntu Mate (version 23.10) computer on an ODROID-HC4, and it’s a manual install, not a snap or docker or anything like that. If I’m missing any other info, please do let me know and I’ll try to provide it. Thanks in advance for you help.

The first thing that comes to mind, if it’s mostly otherwise functioning, is that the Collabora Online - Built-in CODE Server app is dependent on /tmp since it’s not a real/fully permanent installation. Since Collabora is fairly large (300 MB - 800 MB on-disk) and resource intensive, each time CODE starts up there can be a not only a noticeable delay, but also one long enough to cause periodic timeouts with the connection with the Nextcloud Office integration app (the one calling that /hosting/capabilities endpoint that is timing out).[1] This is most likely to occur on lower powered systems (e.g. a Raspberry Pi)[2]. The third error (impacting DiscoveryService.php) usually has the same underlying cause.

You have some options/things to try that come to mind:

  • Live with the errors in the logs; the Built-in CODE Server will recovery on its own from timeouts
  • Anything you can do to make sure disk I/O is reasonable (e.g. SSDs no HDDs/etc)
  • Confirm the state of libfuse2 on your system (if it has it, try without it; if it doesn’t have it, try with it)[3]
  • If you happen to have the RAM, maybe try /tmp in RAM (alternatively: if /tmp isn’t well above 300 MB, move it to a persistent disk)
  • Adjust how often /tmp is cleared out
  • You might want to try deploying a fully standalone CODE Server rather than the built-in one. It requires more upfront work, admittedly, but once it’s running it’ll perform better and more reliably since it won’t be effectively unzipping itself into /tmp regularly

[1] richdocumentscode/README.md at master · CollaboraOnline/richdocumentscode · GitHub
[2] richdocumentscode/README.md at master · CollaboraOnline/richdocumentscode · GitHub
[3] FUSE · AppImage/AppImageKit Wiki · GitHub

1 Like

Running a standalone server sounds like the right solution for me TBH. (Warning, off-topic ramble incoming) We don’t have a lot of people who are going to use this server (probably 3-4 max unless our family situation significantly changes) but I write a lot and every bit of performance I can squeeze out of the online editor would be deeply appreciated; I have to use the online editor because I collaborate with at least one other person who lives far away, and the ability to be able to see each other’s edits/comments live is essential. (I seriously doubt I could figure out how to set that up with LibreOffice desktop even if it were possible haha.)

All this to say, I tried looking up tutorials for setting up Collabora for Nextcloud and I couldn’t figure it out. Most of it seems outdated… I haven’t really dug into it yet though, so I can probably figure it out with enough time. That being said, if anyone has any tutorial/resource recommendations, I’d appreciate it a lot.

I’ll also look into the other suggestions you said. I’m very new to server administration but I recently received a (very large) book to help me learn best practices and such, and while the Ubuntu MATE desktop is helpful as a beginner Linux user, it’s probably best to disable it, isn’t it… Kinda wish I had gone for Ubuntu Minimal instead now haha. But figuring out all that is an entirely separate project from this thread. And before I forget - thanks for the tips!

Edit: Well, I have searched for tutorials on installing Collabora, and I now remember why I gave up so quickly the first time. All the text tutorials seem outdated or just plain inaccurate… I really need a recommendation of a tutorial haha.

Regarding this: I thought I should say, I figured out how to install it properly and got it working a few days ago. So we’re all good here!

1 Like