2016-11-09 77 views
2

我下載的Apache鑽V1.8,編輯conf/drill-override.conf有以下變化:如何在分佈式模式下本地啓動drillbit?

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集羣有效組成4個動物園管理員實例的開始一樣,一臺機器上,我想開始鑽取。 (即我只使用一臺機器爲Apache鑽和動物園管理員的集羣,機器的IP是10.178.23.140

所以,我不斷收到此錯誤:

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 

爲什麼鑽頭抱怨是綁定到回送地址?!

  1. 我沒有配置鑽頭的IP綁定到!
  2. 而且由於我在我的機器上啓動鑽頭鑽取過程,我的機器會嘗試綁定哪些其他IP?

回答

3

的問題是,我/etc/hosts中文件中有這樣的條目

127.0.1.1 mgelbana-machine 

這使我的主機名解析爲環回地址。要解決此問題,您可以執行以下任一操作

  • 刪除此行解決了我的問題。
  • 將我的主機名解析爲非回送IP地址。

Source

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."); 
    } 
} 

爲什麼鑽拒絕,同時綁定到環回地址來啓動的原因,是differentiate between Drill nodes registered in Zookeeper.

相關問題