0

Now we try to use H2o to construct training cluster. It is easy to use by running java -jar ./h2o.jar and we can setup the cluster with simple flatfile.txt which contain multiple ip and ports.

But we found that it is impossible to setup the h2o cluster within docker containers. Although we can start multiple containers to run java -jar ./h2o.jar and add the prepared flatfile.txt, the h2o process will try to bind local(container's eth0) ip which is different from the one in flatfile.txt. We can java -jar ./h2o.jar -ip $ip to set the one which is in flatfile.txt but h2o instance is not able to run without this "external" ip.

enter image description here

tobe
  • 1,671
  • 2
  • 23
  • 38
  • It seems H2o needs to broadcast the packages and we should not expose specified ports to make it works. – tobe Oct 26 '18 at 02:48

2 Answers2

1

If you use use "docker run --network=host ..." it will work.

TomKraljevic
  • 3,661
  • 11
  • 14
  • Thanks. Yes it works but it is not allowed to expose all the ports for this container. Actually we want to run h2o cluster in Kubernetes and try to test in multiple docker containers. Do you know the exact ports which should be exposed? – tobe Oct 25 '18 at 08:57
  • When you start H2O with -port N then H2O uses port N and port N+1. – TomKraljevic Oct 26 '18 at 12:20
0

See my response to a similar issue here. I describe how it is possible to start an H2O cluster using a flatfile and docker swarm. Basically, you have to run a script in each service before starting H2O, to identify the correct IP addresses for the cluster. This is because docker assigns two IPs to each service. The flatfile needs to use the $HOSTNAME IP for each cluster member, which is difficult to determine in advance.

caewok
  • 91
  • 1
  • 3