Z0ltrix commented on issue #2415: URL: https://github.com/apache/drill/issues/2415#issuecomment-1001158038
> Hi @Z0ltrix Thanks for the information, But it would be great if you could give example what should be within /etc/hosts. This is my testing environment so the vms contain external IP, In our actual environment non of the vms would have a external IP so we wouldn't need to config DNS with our cloud provider. > > **It would be great if you give a eg to refer:** My current hosts file looks like this below > > ``` > cat /etc/hosts > 127.0.0.1 localhost > > # The following lines are desirable for IPv6 capable hosts > ::1 ip6-localhost ip6-loopback > fe00::0 ip6-localnet > ff00::0 ip6-mcastprefix > ff02::1 ip6-allnodes > ff02::2 ip6-allrouters > ff02::3 ip6-allhosts > 169.254.169.254 metadata.google.internal metadata > ``` This means in your production environment you do not want to connect the drillbits from outside? An adequate example with a minimal drill/zookeeper production environment should have the following nodes: 1. zookeeper1 2. zookeeper2 3. zookeeper3 4. drillbit1 5. drillbit2 6. drillbit3 let's assume that we have only internal communication, so we are not in need of any DNS provider. ### zookeeper1 `/etc/hostname`: ``` zookeeper1.my.great.cluster.com ``` `/etc/hosts`: ``` 127.0.0.1 localhost 10.0.0.1 zookeeper1 zookeeper1.my.great.cluster.com 10.0.0.2 zookeeper2 zookeeper2.my.great.cluster.com 10.0.0.3 zookeeper3 zookeeper3.my.great.cluster.com 10.0.1.1 drillbit1 drillbit1.my.great.cluster.com 10.0.1.2 drillbit2 drillbit2.my.great.cluster.com 10.0.1.3 drillbit3 drillbit3.my.great.cluster.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 69.254.169.254 metadata.google.internal metadata ``` ### zookeeper2 `/etc/hostname`: ``` zookeeper2.my.great.cluster.com ``` `/etc/hosts`: ``` 127.0.0.1 localhost 10.0.0.1 zookeeper1 zookeeper1.my.great.cluster.com 10.0.0.2 zookeeper2 zookeeper2.my.great.cluster.com 10.0.0.3 zookeeper3 zookeeper3.my.great.cluster.com 10.0.1.1 drillbit1 drillbit1.my.great.cluster.com 10.0.1.2 drillbit2 drillbit2.my.great.cluster.com 10.0.1.3 drillbit3 drillbit3.my.great.cluster.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 69.254.169.254 metadata.google.internal metadata ``` ### zookeeper3 `/etc/hostname`: ``` zookeeper3.my.great.cluster.com ``` `/etc/hosts`: ``` 127.0.0.1 localhost 10.0.0.1 zookeeper1 zookeeper1.my.great.cluster.com 10.0.0.2 zookeeper2 zookeeper2.my.great.cluster.com 10.0.0.3 zookeeper3 zookeeper3.my.great.cluster.com 10.0.1.1 drillbit1 drillbit1.my.great.cluster.com 10.0.1.2 drillbit2 drillbit2.my.great.cluster.com 10.0.1.3 drillbit3 drillbit3.my.great.cluster.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 69.254.169.254 metadata.google.internal metadata ``` ### drillbit1 `/etc/hostname`: ``` drillbit1.my.great.cluster.com ``` `/etc/hosts`: ``` 127.0.0.1 localhost 10.0.0.1 zookeeper1 zookeeper1.my.great.cluster.com 10.0.0.2 zookeeper2 zookeeper2.my.great.cluster.com 10.0.0.3 zookeeper3 zookeeper3.my.great.cluster.com 10.0.1.1 drillbit1 drillbit1.my.great.cluster.com 10.0.1.2 drillbit2 drillbit2.my.great.cluster.com 10.0.1.3 drillbit3 drillbit3.my.great.cluster.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 69.254.169.254 metadata.google.internal metadata ``` ### drillbit2 `/etc/hostname`: ``` drillbit2.my.great.cluster.com ``` `/etc/hosts`: ``` 127.0.0.1 localhost 10.0.0.1 zookeeper1 zookeeper1.my.great.cluster.com 10.0.0.2 zookeeper2 zookeeper2.my.great.cluster.com 10.0.0.3 zookeeper3 zookeeper3.my.great.cluster.com 10.0.1.1 drillbit1 drillbit1.my.great.cluster.com 10.0.1.2 drillbit2 drillbit2.my.great.cluster.com 10.0.1.3 drillbit3 drillbit3.my.great.cluster.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 69.254.169.254 metadata.google.internal metadata ``` ### drillbit3 `/etc/hostname`: ``` drillbit3.my.great.cluster.com ``` `/etc/hosts`: ``` 127.0.0.1 localhost 10.0.0.1 zookeeper1 zookeeper1.my.great.cluster.com 10.0.0.2 zookeeper2 zookeeper2.my.great.cluster.com 10.0.0.3 zookeeper3 zookeeper3.my.great.cluster.com 10.0.1.1 drillbit1 drillbit1.my.great.cluster.com 10.0.1.2 drillbit2 drillbit2.my.great.cluster.com 10.0.1.3 drillbit3 drillbit3.my.great.cluster.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 69.254.169.254 metadata.google.internal metadata ``` As you can see, `/etc/hosts` is equal on every machine, so that all can find each other without DNS. The internal ip's has to be changed to the real interla ip's of your cloud provider. Now Drill should register itself with `drillbit1-3.my.great.cluster.com` within zookeeper and each node can find the other ones. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
