Jelastic - Collabora Online with Next Cloud without ssl (for testing)

*爱你&永不变心* 提交于 2019-12-11 12:32:51

问题


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.

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 :

Then I try to map port by adding a Endpoint:

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.


回答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



来源:https://stackoverflow.com/questions/56020031/jelastic-collabora-online-with-next-cloud-without-ssl-for-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!