Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apache-drill-1.12.0 "Failure in starting embedded Drillbit" and "no current connection error" (Windows 10)

I am using apache-drill-1.12.0 on Windows 10. I get "no current connection" errors when sending any queries. Also, drill web console which should be working on localhost:8047 is not working.

I have searched many answers on StackOverflow said about setting JAVA_HOME environment variable correctly to avoid errors.

I have set JAVA_HOME system variable correctly and here is the proof for that.

C:\Users\Dinesh>java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

C:\Users\Dinesh>javac -version
javac 1.8.0_171

C:\Users\Dinesh>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_171

Now here is the following set of errors, I am facing with apache drill on windows 10.

C:\Users\Dinesh\Desktop\Drill\apache-drill-1.12.0\bin>sqlline.bat -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
HADOOP_HOME not detected...
HBASE_HOME not detected...
Calculating Drill classpath...
Error: Failure in starting embedded Drillbit: java.lang.RuntimeException: Unable to deserialize "/tmp/drill/sys.storage_plugins/openTSDB.sys.drill" (state=,code=0)
java.sql.SQLException: Failure in starting embedded Drillbit: java.lang.RuntimeException: Unable to deserialize "/tmp/drill/sys.storage_plugins/openTSDB.sys.drill"
        at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:142)
        at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
        at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
        at org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:144)
        at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
        at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
        at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
        at sqlline.Commands.connect(Commands.java:1083)
        at sqlline.Commands.connect(Commands.java:1015)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
        at sqlline.SqlLine.dispatch(SqlLine.java:742)
        at sqlline.SqlLine.initArgs(SqlLine.java:528)
        at sqlline.SqlLine.begin(SqlLine.java:596)
        at sqlline.SqlLine.start(SqlLine.java:375)
        at sqlline.SqlLine.main(SqlLine.java:268)
Caused by: java.lang.RuntimeException: Unable to deserialize "/tmp/drill/sys.storage_plugins/openTSDB.sys.drill"
        at org.apache.drill.exec.store.sys.store.LocalPersistentStore.get(LocalPersistentStore.java:203)
        at org.apache.drill.exec.store.sys.store.LocalPersistentStore.get(LocalPersistentStore.java:182)
        at org.apache.drill.exec.store.sys.store.LocalPersistentStore$2.apply(LocalPersistentStore.java:142)
        at org.apache.drill.exec.store.sys.store.LocalPersistentStore$2.apply(LocalPersistentStore.java:138)
        at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
        at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
        at com.google.common.collect.Iterators.addAll(Iterators.java:362)
        at com.google.common.collect.Lists.newArrayList(Lists.java:160)
        at org.apache.drill.exec.store.StoragePluginRegistryImpl.createPlugins(StoragePluginRegistryImpl.java:164)
        at org.apache.drill.exec.store.StoragePluginRegistryImpl.init(StoragePluginRegistryImpl.java:129)
        at org.apache.drill.exec.server.Drillbit.run(Drillbit.java:188)
        at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:133)
        ... 18 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Could not resolve type id 'openTSDB' into a subtype of [simple type, class org.apache.drill.common.logical.StoragePluginConfig]: known type ids = [InfoSchemaConfig, StoragePluginConfig, SystemTablePluginConfig, file, hbase, hive, jdbc, kafka, kudu, mock, mongo, named]
 at [Source: [B@519e7396; line: 2, column: 12]
        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:256)
        at com.fasterxml.jackson.databind.DeserializationContext.unknownTypeException(DeserializationContext.java:1083)
        at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:281)
        at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:163)
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:106)
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:91)
        at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:142)
        at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:63)
        at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1579)
        at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1217)
        at org.apache.drill.exec.serialization.JacksonSerializer.deserialize(JacksonSerializer.java:38)
        at org.apache.drill.exec.store.sys.store.LocalPersistentStore.get(LocalPersistentStore.java:201)
        ... 29 more
apache drill 1.12.0
"a drill in the hand is better than two in the bush"
0: jdbc:drill:zk=local> SELECT version FROM sys.version;
No current connection
0: jdbc:drill:zk=local>

Here the main error that I get from command line is Failure in starting embedded Drillbit: java.lang.RuntimeException: Unable to deserialize "/tmp/drill/sys.storage_plugins/openTSDB.sys.drill" (state=,code=0).

like image 628
Dinesh Sonachalam Avatar asked May 23 '18 11:05

Dinesh Sonachalam


1 Answers

Looks like you have used older (or newer) version of Drill earlier and that version created plugin configs in your /tmp/drill/sys.storage_plugins/ folder. If any plugin config is changed, the user should remove that directory to use other version of Drill.

I suggest you to use the latest Drill 1.13 version of Drill and to clean your /tmp/drill/ directory.

like image 127
Vitalii Diravka Avatar answered Nov 03 '22 04:11

Vitalii Diravka