Collabora "connecting" delay for 20 seconds

ugly hack #1

iptables -t nat -I PREROUTING -d 192.168.100.1 -p udp --dport 53 -j DNAT --to-destination (your nameserver ip)

eg:
iptables -t nat -I PREROUTING -d 192.168.100.1 -p udp --dport 53 -j DNAT --to-destination 192.168.25.11

bang. documents come up right away.

this is a horrible solution to the problem. the DNS requests are essentially failing, but failing very quickly rather than timing out.

i’m trying to work on getting the docker embedded DNS proxy working. I suspect i’ll need to change the IP of the docker bridge to 192.168.100.1 in order to get this working as intended. this will probably work for people (such as myself) that have spun up a VM solely for the purpose of running collabora, but would not be a solution for those running on an existing docker host.

i’m still unsure how the collabora container is meant to have its DNS configured, but that might be something for the creator of it to answer.

1 Like

Hi,

thats not horrible … thats great :rocket:

Works like a charm :slight_smile:

Thanks.

Cheers,
Andreas

1 Like

another ugly hack ???

I just renamed the file

/opt/lool/systemplate/etc/resolv.conf to /opt/lool/systemplate/etc/resolv.conf_bak

and created a soft link to the system resolv.conf

 ln -s /etc/resolv.conf /opt/lool/systemplate/etc/resolv.conf

Seems to be okay too :slight_smile:

Cheers,
Andreas

1 Like

You can change the nameserver in /etc/resolv.conf inside a docker container via the --dns=ip option to the docker run command.

I just tested this, but it doesn’t change the delay… Is CODE using the /opt/lool/systemplate/etc/resolv.conf file?

i’ve just been trying to do the same thing, but i can’t work out how to save the changes. whenever i get into the container like:

docker run -it collabora/code /bin/bash

and make any changes and exit, none of them stick. from what i understand with docker this is “by design”.

what’s the procedure to be able to make maintenance changes to a docker image and commit them locally?

edit: i taught myself how to use “docker commit” and i’ve worked this part out now.

I just tested this, but it doesn’t change the delay… Is CODE using the /opt/lool/systemplate/etc/resolv.conf file?

no - this is the problem. docker ensures that the /etc/resolv.conf is provided via a special mount (so the contents of this file inside the image are not actually used). the --dns-ip option allows you to override the default action which is to simply use the contents of the host /etc/resolv.conf. normally this option isn’t required unless you have a nameserver bound to the loopback adapter of the host or similar weird/special config.

from what I understand the /opt/lool/systemplate/ is like a chroot jail used by the environment of the document editor, so it’s the collabora subprocess which sees this as the resolv.conf to use. this comes factory prepared from the person who packaged this image as 192.168.100.1 (and it was 192.168.65.1 in the previous release).

@guddl 's response above seems like a good solution to this issue - assuming that the chroot jail or whatever collabora uses is happy with a symbolic link.

i’m guessing that since the /etc/resolv.conf is mounted in by docker that it would probably be recommended to rename the file and create the symbolic link in the /start-libreoffice.sh or /etc/rc.local or something simiilar. i’m not sure how solid a symbolic link to a mount would be.

ok. i’ve got this working ok now. i removed the /opt/look/systemplate/etc/resolv.conf file and modified the beginning of /start-libreoffice.sh so it reads like:

#!/bin/sh

# Fix lool resolv.conf problem (wizdude)
ln -s /etc/resolv.conf /opt/lool/systemplate/etc/resolv.conf

# Generate new SSL certificate instead of using the default

i’ve run some tcpdump’s and I’m not seeing any DNS query related problems anymore. Collabora Online is working great - nice and quick and no more delays.

i think the creator of this docker should be notified of this issue. are they here reading this thread? or do I need to report this back somewhere else?

cheers, wizdude

1 Like

Maybe this script is used inside the Dockerifle/Docker container to build the resulting docker container? https://github.com/LibreOffice/online/blob/master/loolwsd/loolwsd-systemplate-setup#L26

@jospoortvliet can you point this issue and the solution to the team which created the docker container? Maybe it would be good to explain a bit more how the docker container is created, or share the Dockerfile, so more people can have a look at it/improve it? Thanks!

1 Like

thank you for your solution but it does not rule my house.
I have the resolv.conf I delete and I do well the symbolic link.
by cons must restart after you?
For information on symbolic link is removed if I stop the docker, you must then redo the symbolic link.
ps: I have two for a certificate for a nextcloud and collaborated.
You have an idea?

Is working i change .sh and is working
I upgraded a docker image of collabora .

But i have a slow file to open whis a caracter spĂŠcial ! in france you have example

file open correctly : liberte.xls
file not open slow : libertĂŠ.xls

are you this problem ?

1 Like

See this : Collabora docker fails to open files with special chars

1 Like

thks i looking !

question : you have testing collabora whis nextcloud V10 ?

I started with 10.0 Beta now i am on 10.0 stable. It’s working well

1 Like

hi nemskiller thks
and if you have time to create tuto i love u :slight_smile:

Here it is : [HOWTO] Collabora 2.0 without using Docker not for prod

hello , thks for a tuto .

Whis nextcloud 10 , you have in admin a menu of collabora , because is working but i dont have a menu ! ?

If I understand you correctly, you mean you can’t find a way to open the Collabore office suite from inside Nextcloud?

For this you have to install an app: you’ll need to enable experimental apps (not sure about this however) and then go to the Productivy section and enable the “Collabora Online” app.

Good luck!

What he probably means is the actual admin panel of LibreOffice Online:

hello
where are you this interface ? in nexcloud ?

you have also there for the URL

Go in admin -> then additional settings -> then you have collabora