Reputation: 4000
I downloaded Apache Drill v1.8, edited the conf/drill-override.conf
to have the following changes:
drill.exec: {
cluster-id: "drillbits1",
zk.connect: "10.178.23.140:2181,10.178.23.140:2182,10.178.23.140:2183,10.178.23.140:2184"
}
..zookeeper cluster is effectively consisted of 4 Zookeeper instances started on the same, one machine, I'm trying to start Drill on. (i.e. I'm only using one machine for Apache Drill and Zookeeper's cluster, the machine's IP is 10.178.23.140)
So I keep getting this error:
Exception in thread "main" org.apache.drill.exec.exception.DrillbitStartupException: Failure during initial startup of Drillbit.
at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:295)
at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:271)
at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:267)
Caused by: org.apache.drill.exec.exception.DrillbitStartupException: Drillbit is disallowed to bind to loopback address in distributed mode.
at org.apache.drill.exec.service.ServiceEngine.checkLoopbackAddress(ServiceEngine.java:186)
at org.apache.drill.exec.service.ServiceEngine.start(ServiceEngine.java:146)
at org.apache.drill.exec.server.Drillbit.run(Drillbit.java:119)
at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:291)
... 2 more
Why does drillbit complain about being bound to a loopback address ?!
Upvotes: 3
Views: 2145
Reputation: 590
Another solution is to use the following Drill system option, which was introduced in Drill 1.14:
drill.exec.allow_loopback_address_binding: true
Specify this option in the /conf/drill-override.conf
file.
Upvotes: 2
Reputation: 4000
The problem was that my /etc/hosts file had this entry
127.0.1.1 mgelbana-machine
This made my hostname resolvable to a loopback address. To resolve this, you can do either of the following
private void checkLoopbackAddress(String address) throws DrillbitStartupException, UnknownHostException {
if (isDistributedMode && InetAddress.getByName(address).isLoopbackAddress()) {
throw new DrillbitStartupException("Drillbit is disallowed to bind to loopback address in distributed mode.");
}
}
The reason why Drill refuses to startup while bound to a loopback address, is to differentiate between Drill nodes registered in Zookeeper.
Upvotes: 7