Support Questions
Find answers, ask questions, and share your expertise

“Invalid type marker byte 0x3c” when accessing from Hive



I’m having Hortonworks HDP 2.6 installed together with the druid version that ships with it. I have installed Druid on a Kerberos secured cluster and are having problem accessing Druid from Hive. I can create a Druid datasource from hive using a normal “create table” statement, but I cant do a select on it. Once the datasource is created in Druid, I can do a normal json rest query directly to druid and I get the expected result back. So it feels like the Druid part is working as it should.

When I query the data from Hive, I get two different output saying the same thing.

Error: Invalid type marker byte 0x3c for expected value token at [Source:; line: -1, column: 1] (state=,code=0)


Error: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

at [Source:; line: 1, column: 2]













at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextSplits(

at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(

at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(

at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(

at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(

at org.apache.hadoop.hive.ql.Driver.getResults(

at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(

at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(

at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(

at org.apache.hive.service.cli.CLIService.fetchResults(

at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(

at org.apache.hive.service.rpc.thrift.TCLIService$Processor$FetchResults.getResult(

at org.apache.hive.service.rpc.thrift.TCLIService$Processor$FetchResults.getResult(

at org.apache.thrift.ProcessFunction.process(

at org.apache.thrift.TBaseProcessor.process(

at org.apache.thrift.server.TServlet.doPost(

at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPost(

at javax.servlet.http.HttpServlet.service(

at javax.servlet.http.HttpServlet.service(

at org.eclipse.jetty.servlet.ServletHolder.handle(

at org.eclipse.jetty.servlet.ServletHandler.doHandle(

at org.eclipse.jetty.server.session.SessionHandler.doHandle(

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(

at org.eclipse.jetty.servlet.ServletHandler.doScope(

at org.eclipse.jetty.server.session.SessionHandler.doScope(

at org.eclipse.jetty.server.handler.ContextHandler.doScope(

at org.eclipse.jetty.server.handler.ScopedHandler.handle(

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(

at org.eclipse.jetty.server.Server.handle(

at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(

at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(

at org.eclipse.jetty.http.HttpParser.parseNext(

at org.eclipse.jetty.http.HttpParser.parseAvailable(

at org.eclipse.jetty.server.AsyncHttpConnection.handle(



at java.util.concurrent.ThreadPoolExecutor.runWorker(

at java.util.concurrent.ThreadPoolExecutor$

at (state=,code=0)

Does anybody have any idea about whats wrong here?



An update!

I did a network package debug to see what druid is returning to Hive, and I actually get a authentication error (see output further down). Most likely this is due to Kerberos configured in the cluster. Strange that I can create the datasource from Hive without getting this error. Now I’m hoping that it’s just a configuration issue about setting the correct Hive settings to be able to connect to a Kerberos enabled Druid installation. If anybody got a hint, please let me know



<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>

<title>Error 401 </title>



<h2>HTTP ERROR: 401</h2>

<p>Problem accessing /druid/v2/. Reason:

<pre> Authentication required</pre></p>

<hr /><i><small>Powered by Jetty://</small></i>



Expert Contributor

Hi seems like your druid instance is a secured cluster, unfortunately the hive druid integration does not support Kerberos yet, it is coming soon.

Expert Contributor

To make sue i am getting this how do you query the data via rest call ? are you including your kerberos credentials ?


Yes. When I make the REST call with curl, I include the Kerberos credentials and it work fine then.

To be able to go forward with the rest of the tests, I made a really REALLY ugly solution (not in production, just test environment). I added /druid to so the query works from Hive without hitting the unsupported Kerberos problem. Nothing I can recommend to do, but it gives us the possibility test the rest of the solution until the Kerberos problem is fixed.

; ;