Nextcloud and Collabora Integration

Nextcloud and Collabora Integration

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Is it normal in the caddy.log to get this error after closing a document?
Code:
2020/04/30 10:03:16 [ERROR] failed to copy buffer:  readfrom tcp 192.168.5.82:50025->192.168.5.89:9980: read tcp 192.168.5.82:443->192.168.5.30:12236: use of closed network connection
 
Joined
Jan 4, 2014
Messages
1,644
Is it normal in the caddy.log to get this error after closing a document?
Thanks for pointing this out. I hadn't noticed this error before, but it does appear in my Caddy log as well.

I was going to suggest that you repost this in the Caddy discussion area, but the more I looked into this, the more I felt the Caddy error was due to the behaviour of Collabora within the Nextcloud environment. So, I'm happy to deal with it in this discussion area (though I'd still like to bring it to the attention of @danb35 as it is Caddy flagging the error).

I'm tempted to ignore the error for several reasons:
  1. There has not been any outwardly visible impact (such as file corruption) arising from the error in the weeks I've been trialling Nextcloud-Collabora integration;
  2. There isn't any evidence of a problem in the Nextcloud and Collabora logs at around the time the issue is flagged by Caddy;
  3. I noticed that saving a document within Collabora doesn't give rise to the error. Rather, the error is flagged when Collabora exits and returns control to Nextcloud; and
  4. This Caddy forum post https://caddy.community/t/error-failed-to-copy-buffer/5629/3 seems to support my observations as it suggests that the Caddy error arises from an upstream server terminating a connection.
 
Last edited:

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Nextcloud and Collabora Integration with a new update entry:

Introducing Docker Compose

This update brings us one step closer to the automatic updating of the Collabora CODE server. Docker Compose is the enabler for this.

Update instructions are provided below for those who have applied the previous update.

1. From a Ubuntu terminal window, remove the Collabora CODE Server container sudo docker rm -f collabora-code.

2. Remove the Collabora CODE image. First list all images sudo docker images -a, then delete the Collabora CODE image using...

Read the rest of this update entry...
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Basil
After updating to Docker Compose I get the errror in the server log file. Everything is working so I'm not sure if it matters. I only needed to do steps 3 and 4 as 5 & 6 were already done.
Code:
wsd-00007-00007 2020-05-11 16:41:04.059228 [ loolwsd ] INF  WSD initialization complete: setting log-level to [warning] as configured.| wsd/LOOLWSD.cpp:3705
warn:sal.osl:34:32:sal/osl/unx/security.cxx:442: mkdir(/opt/lool/.config): errno=2
warn:sal.osl:38:32:sal/osl/unx/security.cxx:442: mkdir(/opt/lool/.config): errno=2


FYI the links at the end of step 5 say code.mydomain.com not collabora.mydomain.com
 
Joined
Jan 4, 2014
Messages
1,644
FYI the links at the end of step 5 say code.mydomain.com not collabora.mydomain.com
?? I'm missing something here. Can you clarify, please? The links look okay to me.

After updating to Docker Compose I get the errror in the server log file.
Yes, I'm aware of this. Collabora CODE is a development version. If you have a look at this article Getting set up the Collabora Online Development Edition and question 'What are the latest updates?' in the Q & A section, you'll notice that CODE gets updated fairly regularly. What you have is the most current release. The error messages after the first log entry you posted relate to the version of CODE installed. In fact, if you were to watch the log as you use CODE, you'll notice more error entries posted in the log, but there's no outward visible effect. Expect the sorts of errors logged to change with each new CODE release.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
?? I'm missing something here. Can you clarify, please? The links look okay to me.
the address says collabora.mydomain.com but if you hover over to see the link, it is code.mydomain.com. In my setup only collabora.mydomain.com goes to the desired page.
 
Joined
Jan 4, 2014
Messages
1,644
Joined
Jan 4, 2014
Messages
1,644

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I realized I never did the optional update script. After creating update.sh and making it executable I get this error when running it.
Code:
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/images/prune?filters=%7B%22dangling%22%3A%7B%22true%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied
Mon Sep  7 08:38:17 EDT 2020


my collabora directory
Code:
naskar@naskar-BHYVE://home/naskar/collabora$ ls -l
total 8
-rw-rw-r-- 1 naskar naskar 359 May 11 12:34 docker-compose.yml
-rwxr-xr-x 1 naskar naskar 110 Sep  7 08:38 update.sh


my crontab
Code:
10 0 * * * /home/naskar/collabora/update.sh >> /home/naskar/collabora/update.log 2>&1


EDIT: sudo ./update.sh works. Just not used to needing the sudo command.
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Just noticed this in the error logs. Any idea how to correct it?
Code:
Could not detect any host in collabora.mydomain.com/lool/convert-to/png
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I realized that the update script was giving an error and it hasn't done a update in quite a while. Running the update.sh script gave this error
Code:
ERROR: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?
. The script didn't have permission to access docker. This website gave me the answer. Hopefully that is the fix.
 
Joined
Jan 4, 2014
Messages
1,644
Curious. I'm not seeing this error. Still, your post may help others experiencing this problem. Out of interest, which user are you logging in as on Ubuntu?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
naskar
 
Joined
Jan 4, 2014
Messages
1,644
It seems more recent versions of Collabora/CODE aren't working with Nextcloud 21. Track the issue in this Collabora forum thread CODE 6.4.10_Docker - Nextcloud (Not working)

If you depend on Collabora for editing, roll back to the image with tag version 6.4.9.3 for the moment. This appears to work, albeit with some errors appearing in the Collabora log.
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
Want to deploy Collabora CODE using TrueNAS SCALE?

Here's the Compose file used in the original instruction:
Code:
version: '3.3'
services:
  code:
    ports:
      - '9980:9980'
    container_name: collabora-code
    environment:
      - domain=cloud\.mydomain\.com
      - server_name=collabora\.mydomain\.com
      - username=admin
      - password=secret
      - 'extra_params=--o:ssl.enable=false --o:ssl.termination=true'
    restart: always
    image: collabora/code

The equivalent SCALE application settings are shown below:

ts05.jpg

ts07.jpg

ts08.jpg

ts09.jpg


EDIT: There's a problem with the latest version of Collabora CODE. Refer to the previous post for details. For the moment, set the Image Tag field to 6.4.9.3.

EDIT2: The issue was resolved in CODE 6.4.10.6.
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
If you use a Caddy reverse proxy, basic load balancing of Collabora CODE is a snap!

c12.jpg


In this example, Collabora CODE is highly available, but the arrangement is only suitable in an environment where there's no document collaboration. Fortunately, Collabora CODE is scalable so with additional configuration, document collaboration is possible. The configuration required is beyond the scope of this post though.
 
Joined
Jan 4, 2014
Messages
1,644

GardG

Cadet
Joined
Dec 5, 2020
Messages
9
Hi all,

I've followed the guide to install Nextcloud and Collabora on my TrueNAS Core server, and it actually works – thanks a lot for this resource Basil!

As expected I had to roll back to 6.4.9.3 to get it to work. I find this a bit concerning – do Collabora updates often break things like this? It it better not to use auto-updates? Of course I'd like to run the latest versions, but I'd prefer not to have things unexpectedly break …
 
Top