0

I am having trouble with making JDBC connection work. Your help will be much appreciate.

  1. Installed Drill on Windows 10 Pro, ODBC driver, up and running on local node (as in https://drill.apache.org/docs/drill-in-10-minutes/)
  2. Can able to connect and query from Drill Explorer using ODBC.

Drill Shell:

Drill Shell

JDBC:

JDBC

Alias:

Alias

But when I try to connect from SQuirreL as in (https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/), it is not working. I am using the /jars/jdbc-driver/drill-jdbc-all-.jar for JDBC connection.

java.io.IOException: Failure to connect to the zookeeper cluster service within the allotted time of 10000 milliseconds.
at oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.start(ZKClusterCoordinator.java:123)
at oadd.org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:327)
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:158)
at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
at oadd.org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
tobi6
  • 8,033
  • 6
  • 26
  • 41
zeno.mas
  • 1
  • 1

2 Answers2

0

I think you cannot use the ZooKeeper "local" since you are coming from an "external" source via JDBC. Try changing that to "localhost" or your hostname.

tobi6
  • 8,033
  • 6
  • 26
  • 41
  • Thank you tobi6 for your suggestion. I have tried possible combination like using , , localhost. Seems non is working. – zeno.mas Nov 21 '17 at 13:22
0

Finally, this post help my problem. Apache Drill - connection to Drill in Embedded Mode [java]

By using, jdbc:drill:drillbit=192.xxx.xxx.xxx when drill is running, I can connect successfully..

zeno.mas
  • 1
  • 1