Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

while connecting to hiveserver2 from my java client I am getting this exception

avatar
Contributor

org.apache.thrift.protocol.TProtocolException: Required field 'serverProtocolVersion' is unset! Struct:TOpenSessionResp(status:TStatus(statusCode:SUCCESS_STATUS), serverProtocolVersion:null, sessionHandle:TSessionHandle(), configuration:{}) at org.apache.hive.service.cli.thrift.TOpenSessionResp.validate(TOpenSessionResp.java:578) at org.apache.hive.service.cli.thrift.TOpenSessionResp$TOpenSessionRespStandardScheme.read(TOpenSessionResp.java:676) at org.apache.hive.service.cli.thrift.TOpenSessionResp$TOpenSessionRespStandardScheme.read(TOpenSessionResp.java:612) at org.apache.hive.service.cli.thrift.TOpenSessionResp.read(TOpenSessionResp.java:520) at org.apache.hive.service.cli.thrift.TCLIService$OpenSession_result$OpenSession_resultStandardScheme.read(TCLIService.java:2361) at org.apache.hive.service.cli.thrift.TCLIService$OpenSession_result$OpenSession_resultStandardScheme.read(TCLIService.java:2346) at org.apache.hive.service.cli.thrift.TCLIService$OpenSession_result.read(TCLIService.java:2293) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) at org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:160) at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:147)

1 ACCEPTED SOLUTION

avatar
Super Guru

what version of hiveserver2 you are running with? it seems that you are trying to connect with old version of thrift client to the newer version of hiveserver2. can you try to check the the libthrift api version of your hive-client vs hive-server.

if there is a mismatch then you are not able to connect with hive-server as it is known issue with hive.

see this

https://issues.apache.org/jira/browse/HIVE-6050

View solution in original post

1 REPLY 1

avatar
Super Guru

what version of hiveserver2 you are running with? it seems that you are trying to connect with old version of thrift client to the newer version of hiveserver2. can you try to check the the libthrift api version of your hive-client vs hive-server.

if there is a mismatch then you are not able to connect with hive-server as it is known issue with hive.

see this

https://issues.apache.org/jira/browse/HIVE-6050