Apache drill – No current connection

After reading multiple posts, it seems that this is a problem of conflicting jars.

My current setup has apache drill installed using $brew install apache-drill and upon executing $drill-embedded or $drill-localhost, I see below error (line 10)

robin@MacBook-Pro:~$ drill-localhost
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/tez/jars/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/apache-drill/1.7.0/libexec/jars/classb/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.
SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
java.lang.ExceptionInInitializerError
apache drill 1.7.0
"the only truly happy people are children, the creative minority and drill users"
0: jdbc:drill:drillbit=localhost>

It works fine upon launching clean shell. Below is the modified command to launch drill-embedded

env -i HOME="$HOME" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" drill-embedded

See how well it behaved for me 😉

robin@MacBook-Pro:~$ env -i HOME="$HOME" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" drill-embedded
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Sep 12, 2016 3:19:34 PM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29 01:25:26...
apache drill 1.7.0
"this isn't your grandfather's sql"
0: jdbc:drill:zk=local>

Ended up creating this alias for my bash profile

alias drill="env -i HOME="$HOME" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" drill-embedded"

 

References:

  1. http://rmoff.net/2016/06/20/apache-drill-not-connected/

 

 

You may also like...

Leave a Reply

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