1

For testing purpose, I want to install Collabora online on a Jelastic environment.

I'm trying to follow this basic steps : https://www.collaboraoffice.com/code/quick-tryout-nextcloud-docker/

First I configure the topology with the docker image given in the link.

enter image description here

Next cloud is installed successfully after I went to the given URL.

Then I add the variable extra_params=--o:ssl.enable=false as said in the instructions :

enter image description here

Then I try to map port by adding a Endpoint: enter image description here

It map the port 9980 with the public port 11010.

So Finaly, I install the collabora app on nextCloud and configure the Collabora server url on the dedicated Collabora settings page:

jelastic-node-ndd.com:11010

And I got this message when trying to open an Open office document :

Failed to load Collabora Online - please try again later

I don't know how to investigate. When I try to reach the Collabora server on my brother with the given port, I got a connection fails error.

Cawet
  • 254
  • 2
  • 12

1 Answers1

1

We think the main reason of the issue is the fact that port mapping doesn't work in your case. In other words, telnet $(hostname) 11010 says "connection refused" inside container since mapping works correct only from the Internet.

This can be easily overcome by adding of External IP. So, in the settings of "Collabora online" you have to specify URL http://EXT.IP:9980 and remove mapping.

Another way is a mapping trick. In this case, you can left only internal IP and make mapping as you did. Then, edit mapping and specify Private Port equal to Public Port

Further, inside container add NAT rule, like:

iptables -t nat  -A DOCKER ! -i docker0 -p tcp -m tcp --dport 11010 -j DNAT --to-destination 172.21.0.2:9980

Where, 11010 - is your mapping port. 172.21.0.2 - IP you get while performing iptables -L DOCKER -vnt nat

Thus, DOCKER chain should look like this:

root@node210795-nextcloud-test:~# iptables -L DOCKER -vnt nat        
Chain DOCKER (2 references)
 pkts bytes target     prot opt in     out     source               destination         
   19  1140 RETURN     all  --  docker0 *       0.0.0.0/0            0.0.0.0/0           
  106  6360 DNAT       tcp  --  !docker0 *       0.0.0.0/0            0.0.0.0/0            tcp dpt:9980 to:172.21.0.2:9980
   55  3300 DNAT       tcp  --  !docker0 *       0.0.0.0/0            0.0.0.0/0            tcp dpt:11031 to:172.21.0.2:9980

As a result, Collabora online URL in your case can be left as jelastic-node-ndd.com:11010

Besides this, you can face the issue described here

We were able to fix this issue using the article Setting up and configuring collabora/code Docker image (Use the configuration file directly). Before coping loolwsd.xml back to docker (step 3) you might need to chmod this file:

chmod 666 loolwsd.xml

Note: It's better to specify additional parameter --restart always in step 5 of Quick tryout with Nextcloud docker

Variable DOCKER_EXPOSE_PORT should be left intact (80)

extra_params=--o:ssl.enable=false is a variable of collabora/code, so no needs to specify it in Variables

Virtuozzo
  • 1,993
  • 1
  • 10
  • 13
  • Thank's for your help ! I'm not realy in it for now but I'll try this soon ! – Cawet Jun 19 '19 at 12:56
  • what do you mean by "edit mapping and specify Private Port equal to Public Port" ? – Cawet Jun 24 '19 at 18:06
  • @Cawet we mean the following. (1) add endpoint https://docs.jelastic.com/endpoints#add; (2) specify Private port as 9980; (3) save, so as a result you'll get port 11xxx as Public one; (4) edit the created endpoint and change Private port (9980) to Public one (11xxx) you got in the step 3, making both private and public ports equal; (5) save; (6) create NAT rule we mentioned in the above answer, where 11010 is port 11xxx you got in step 3. yep, it's tricky a bit but it works :) – Virtuozzo Jun 25 '19 at 13:29
  • Ok it's what I thought, but for step 6, what container your are talking about ? Sorry I'm not sys admin ^^ . Inside the collabora node, I got this answer if I try to had the nat rules has you said :"iptables: No chain/target/match by that name." – Cawet Jun 25 '19 at 15:31
  • anyway, I try to add an external IP. It still responding "connection refused" – Cawet Jun 25 '19 at 17:04
  • **Inside the collabora node, I got this answer if I try to had the nat rules has you said :"iptables: No chain/target/match by that name."** This should be done not inside collabora node but level upper, where collabora is run, so if everything is right, you're able to see something like this https://prnt.sc/o6tj9p **anyway, I try to add an external IP. It still responding "connection refused"** Answer will be processed in frame of https://stackoverflow.com/questions/56751932/docker-container-local-networking-in-jelastic – Virtuozzo Jun 26 '19 at 08:36
  • __"his should be done not inside collabora node but level upper, where collabora is run"__ That's what I'm not understanding : I don't have any access to the upper level, Collabora Is a docker node (called "code"), has you can see In the first Image in my inital post. Did I have to create a node with docker inside, and pull the collabora image from it ? Or can I access to the root server where all my docker node is set up ? (cause I don't find how). Again, thank's for your time =) – Cawet Jun 26 '19 at 09:55
  • **Did I have to create a node with docker inside, and pull the collabora image from it ?** Indeed, we didn't notice you had a dedicated node for collabora. All our explanation is around nextcloud node with installed docker-ce inside and rolled out collabora/code there :\. Should we investigate exactly your case with two dedicated nodes nextcloud + collabora. Maybe nextcloud with installed collabora inside fits your demands? – Virtuozzo Jun 26 '19 at 14:57
  • Damned I'll try this right now and come back to tel you the result! – Cawet Jun 26 '19 at 15:25
  • You make me discover docker-ce and from that, everything make sence =D Collabora up and running ! Thx ! – Cawet Jun 26 '19 at 17:09