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.

Connect to Spark Thrift Server with Beeline

Highlighted

Connect to Spark Thrift Server with Beeline

New Contributor

When trying to connect to Spark Thrift Server with Beeline I receive the following error message:

 

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)
    	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:79)
    	at org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:156)
    	at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:143)
    	at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:583)
    	at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:192)
    	at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
    	at java.sql.DriverManager.getConnection(DriverManager.java:664)
    	at java.sql.DriverManager.getConnection(DriverManager.java:208)
    	at org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:142)
    	at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:207)
    	at org.apache.hive.beeline.Commands.connect(Commands.java:1149)
    	at org.apache.hive.beeline.Commands.connect(Commands.java:1070)
    	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 org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:52)
    	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:970)
    	at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:813)
    	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:771)
    	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:484)
    	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:467)
    Error: Could not establish connection to jdbc:hive2://localhost:10000: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default}) (state=08S01,code=0)

At first I thought it was that my hive-jdbc version was different from my hive version, but I updated the pom.xml file to use 1.1.0 to match the version of hive on my VM. However, I'm still getting the same error.