Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

client_protocol' is unset

client_protocol' is unset

Contributor

I am using horton version HDP-2.6.2.0

I am trying to connect to hive using java client. I fail on:

org.apache.thrift.TApplicationException: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default})
        at org.apache.thrift.TApplicationException.read(TApplicationException.java:111) ~[libthrift-0.9.3.jar!/:0.9.3]
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:79) ~[libthrift-0.9.3.jar!/:0.9.3]
        at org.apache.hive.service.rpc.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:168) ~[hive-service-rpc-2.1.1.jar!/:2.1.1]
        at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:155) ~[hive-service-rpc-2.1.1.jar!/:2.1.1]
        at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:576) ~[hive-jdbc-2.1.1.jar!/:2.1.1]
        ... 15 common frames omitted


<br>

The hive-jdbc version as you can see is 2.1.1. I read this may be a mismatch between client and server versions. I couldn't find anywhere what is the correct mapping to my server version.

It seems to work with hive-jdbc 2.0.0 - but that's quite old. How can I use latest?

Don't have an account?
Coming from Hortonworks? Activate your account here