Hi all, I'm new to Drill, and I'm still trying to get a handle on how all of the configuration options work. I was able to successfully follow the tutorial for the embedded setup and I'm trying to get a distributed system set up now. I thought I should take baby steps, so my environment is very simple:
- Host A: Zookeeper - Host B: Drill - Host C: Squirrel SQL + JDBC driver I'm not using Hadoop yet, since there's only one Drill service running. I followed all of the instructions, and I was able to successfully connect to the Drill server using sqlline from Host B. However, when I try to connect using Squirrel SQL from a remote server (Host C), I get an error. Using connection URL "jdbc:drill:zk=HostA:2181/drill/drill-cluster" (my cluster id is "drill-cluster") I get a large stacktrace, the root cause of which is this: Caused by: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: localhost/127.0.0.1:31010 at io.netty.util.concurrent.AbstractFuture.get(AbstractFuture.java:37) at org.apache.drill.exec.rpc.BasicClient$ConnectionMultiListener$ConnectionHandler.operationComplete(BasicClient.java:154) ... 13 more Caused by: java.net.ConnectException: Connection refused: localhost/ 127.0.0.1:31010 at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:287) ... 6 more Judging from the stacktrace, the JDBC driver is getting told to try to connect to "localhost" instead of Host B. Thinking this odd, I went into Zookeeper using zkCli.sh to look at the persisted config. Lo and behold, "get /drill/drill-cluster/<HostB_znode>" is showing "localhost" as well: [zk: localhost:2181(CONNECTED) 0] get /drill/drill-cluster/48cc0eac-9be5-41a7-a530-ff0626dfce75 $48cc0eac-9be5-41a7-a530-ff0626dfce75���ϒ) localhost���� �� cZxid = 0x7f ctime = Sun Oct 19 19:50:28 UTC 2014 mZxid = 0x7f mtime = Sun Oct 19 19:50:28 UTC 2014 pZxid = 0x7f cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x14929cfe9210023 dataLength = 70 numChildren = 0 At this point, I'm fairly sure I this is my problem. It explains why Host B can connect over sqlline (drillbit is available at localhost) and why I can't connect from Host C (no drillbit at localhost). I'm still a little unclear on how the client connection to Drillbits actually works, but I assume that at some point an external client can connect to it. Judging from the architecture diagrams, I believe Zookeeper returns the hostname/IP address of one of the Drillbits to the JDBC driver. So then, here's my question: How do I go about making the drillbit running on Host B register itself in Zookeeper with its proper hostname instead of "localhost"? Please keep in mind I'm new to Drill, so if I've grossly misunderstood something please enlighten me :)
