How to Connect to Drill via JDBC fails with IllegalStateException (java.lang.IllegalStateException: No DrillbitEndpoint can be found)

Share on Google+Share on FacebookShare on LinkedInPin on PinterestTweet about this on TwitterEmail this to someone

This  is my own  Generated code which I am using to connect to Drill via JDBC and query  *.csv file on my cloudera sandbox.


Connection connection =DriverManager.getConnection(“jdbc:drill:zk=localhost:2181″,”root”,”cloudera”);
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery(“SELECT * from dfs.`/home/cloudera/Desktop/test.csv`”);
}catch(Exception e){
//Handle errors

That code fails to connect to Drill with the following error:

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
java.lang.IllegalStateException: No DrillbitEndpoint can be found
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(
at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(
at org.apache.drill.jdbc.impl.DrillFactory.newConnection(
at org.apache.drill.jdbc.Driver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at DrillAWT$1$1.actionPerformed(
at javax.swing.AbstractButton.fireActionPerformed(
at javax.swing.AbstractButton$Handler.actionPerformed(
at javax.swing.DefaultButtonModel.fireActionPerformed(
at javax.swing.DefaultButtonModel.setPressed(
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(
at java.awt.Component.processMouseEvent(
at javax.swing.JComponent.processMouseEvent(
at java.awt.Component.processEvent(
at java.awt.Container.processEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Container.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.LightweightDispatcher.retargetMouseEvent(
at java.awt.LightweightDispatcher.processMouseEvent(
at java.awt.LightweightDispatcher.dispatchEvent(
at java.awt.Container.dispatchEventImpl(
at java.awt.Window.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$200(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(


Follow these  3 steps to resolve the error:

1)    Along with Apache Drill installed on your Sandbox ( I assume the drill is installed on location /opt/apache-drill-1.5.0 )

ZooKeeper must also be installed on your system ( Here I installed Zookeeper on /opt/zookeeper-3.4.8)

2)    Open file /opt/apache-drill-1.5.0 /conf/drill-override.conf and update the parameters cluster-id and zk.connect.

Note: cluster-id must have a unique value (by default it’s drillbits1, keep the same)

zk.connect should contain Zookeeper host names (IP address of your system. like here I used my system IP address ) and port numbers.

So with this I changed my /opt/apache-drill-1.5.0 /conf/drill-override.conf like below.


3)    Start Both Apache Drill and Zookeeper Services. Use Below mentioned commands:

Starting Apache Drill:

[root@quickstart cloudera]# cd /opt/apache-drill-1.5.0
[root@quickstart apache-drill-1.5.0]# bin/ start
starting drillbit, logging to /opt/apache-drill-1.5.0/log/drillbit.out

Similarly start ZooKeeper using below command

[root@quickstart /]# cd /opt/zookeeper-3.4.8
[root@quickstart zookeeper-3.4.8]# bin/ start
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4.8/bin/../conf/zoo.cfg
Starting zookeeper … STARTED

Now run the code and get the result, and share reviews. :-)


Jeetendra Bajaj

Jeetendra Bajaj is a Hadoop expert who builds analytics reporting to process very large volumes of data for our products and our clients. He has good knowledge of data architecture, database technologies and excellent analytical skills. go more : LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *

− 2 = 1