CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.77k stars 679 forks source link

Docker container crashes if host has IPv6 support disabled in kernel #3102

Open kripton opened 3 years ago

kripton commented 3 years ago

Describe the bug The docker container crashes (and continously restarts if --restart always is used) if it is run on a host machine, that has IPv6 disabled in the running kernel. The error message in the docker container is:

wsd-00007-00007 2021-08-18 21:30:37.391290 [ loolwsd ] DBG  FileServerRoot: /usr/share/loolwsd| wsd/LOOLWSD.cpp:4128
wsd-00007-00007 2021-08-18 21:30:37.399340 [ loolwsd ] DBG  #-1 Created socket. Thread affinity set to 0x7f64c6ba8e00| ./net/Socket.hpp:356
wsd-00007-00007 2021-08-18 21:30:37.399353 [ loolwsd ] ERR  #-1 Failed set ipv6 socket to 0 (EBADF: Bad file descriptor)| net/Socket.cpp:745
wsd-00007-00007 2021-08-18 21:30:37.399438 [ loolwsd ] ERR  #-1 Failed to bind to: IPv6 port: 9980 (EBADF: Bad file descriptor)| net/Socket.cpp:752
wsd-00007-00007 2021-08-18 21:30:37.399447 [ loolwsd ] TRC  #-1 Socket dtor.| ./net/Socket.hpp:138
Failed to listen on Server port(s) (9980-9980). Exiting.
wsd-00007-00007 2021-08-18 21:30:37.399491 [ loolwsd ] FTL  Failed to listen on Server port(s) (9980-9980). Exiting.| wsd/LOOLWSD.cpp:4046

To Reproduce Steps to reproduce the behavior:

  1. Have a machine with # CONFIG_IPV6 is not set (IPv6 disabled)
  2. Run the collabora/code docker image as described in the documentation

Expected behavior Docker container boots fine and is usable.

Actual behavior Docker container crashes / restarts.

Screenshots See log above

Desktop (please complete the following information)

Smartphone (please complete the following information) ???

Additional context none

timar commented 3 years ago

As a workaround, can you try to pass -e "extra_params=--o:net.proto=IPv4" in docker run command line?

kripton commented 3 years ago

@timar : Thanks for the suggestion, that indeed works around the problem. At least the container doesn't restart all the time and I can see this line in the logs: Ready to accept connections on port 9980. I'll configure the Nextcloud plugin and report if it's working properly.

kripton commented 2 years ago

Sorry, forgot to update my status here: I'm a bit stuck since lighttpd (as a ws proxy) and ws/wss don't play nice together.

antonical commented 1 year ago

Just commenting on this as it has been 2 years and this issue is still not fixed. We just installed NC AIO and tried to enable Collabora but this error stops us using it. We do not have an IPV6 network.

Cheers

redtux commented 1 year ago

Hi, I had the same issue yesterday with the Helm chart – and I can confirm that the workaround provided by @timar is working fine.

Maybe a better fix still would be setting "IPv4 only" as a default, and just enabling "IPv6 support" via extra parameter.

A quick fix might be to just update the documentation to better highlight this issue (as not using IPv6 inside containers might not be such an uncommon scenario I guess).

nz2o commented 1 year ago

We have IPv6 disabled as part of security hardening, so this is a show-stopper for us and NextCloud, AIO or not.