Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

HPLSQL on 2.6.3

New Contributor

Hi all,

Due to my job, i would need to load one pl/sql file, but when i tried to trigger a query I get this message:

Unhandled exception in HPL/SQL                                                                                                                                                                                     
java.sql.SQLException: Could not open client transport for any of the Server URI's in ZooKeeper: Could not establish connection to jdbc:hive2://sandbox-hdp.hortonworks.com:10000/;serviceDiscoveryMode=zooKeeper;z
ooKeeperNamespace=hiveserver2: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default})                                                       
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:221)                                                                                                                                     
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)                                                                                                                                            
        at java.sql.DriverManager.getConnection(DriverManager.java:664)                                                                                                                                            
        at java.sql.DriverManager.getConnection(DriverManager.java:247)                                                                                                                                            
        at org.apache.hive.hplsql.Conn.openConnection(Conn.java:209)                                                                                                                                               
        at org.apache.hive.hplsql.Conn.getConnection(Conn.java:162)                                                                                                                                                
        at org.apache.hive.hplsql.Conn.executeSql(Conn.java:104)                                                                                                                                                   
        at org.apache.hive.hplsql.Exec.executeSql(Exec.java:592)                                                                                                                                                   
        at org.apache.hive.hplsql.Stmt.use(Stmt.java:860)                                                                                                                                                          
        at org.apache.hive.hplsql.Stmt.use(Stmt.java:853)                                                                                                                                                          
        at org.apache.hive.hplsql.Exec.visitUse_stmt(Exec.java:1707)                                                                                                                                               
        at org.apache.hive.hplsql.Exec.visitUse_stmt(Exec.java:52)                                                                                                                                                 
        at org.apache.hive.hplsql.HplsqlParser$Use_stmtContext.accept(HplsqlParser.java:14145)                                                                                                                     
        at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)                                                                                                      
        at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:994)                                                                                                                                                    
        at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:52)                                                                                                                                                     
        at org.apache.hive.hplsql.HplsqlParser$StmtContext.accept(HplsqlParser.java:1012)                                                                                                                          
        at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)                                                                                                      
        at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(HplsqlBaseVisitor.java:28)                                                                                                                          
        at org.apache.hive.hplsql.HplsqlParser$BlockContext.accept(HplsqlParser.java:446)                                                                                                                          
        at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)                                                                                                      
        at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:901)                                                                                                                                                 
        at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:52)                                                                                                                                                  
        at org.apache.hive.hplsql.HplsqlParser$ProgramContext.accept(HplsqlParser.java:389)                                                                                                                        
        at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:42)                                                                                                              
        at org.apache.hive.hplsql.Exec.run(Exec.java:760)                                                                                                                                                          
        at org.apache.hive.hplsql.Exec.run(Exec.java:736)                                                                                                                                                          
        at org.apache.hive.hplsql.Hplsql.main(Hplsql.java:23)                                                                                                                                                      
        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.hadoop.util.RunJar.run(RunJar.java:233)                                                                                                                                                      
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)                                                                                                                                                     
Caused by: java.sql.SQLException: Could not establish connection to jdbc:hive2://sandbox-hdp.hortonworks.com:10000/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2: Required field 'client_protocol'
 is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default})                                                                                                                      
        at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:600)                                                                                                                                
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:198)                                                                                                                                     
        ... 33 more                                                                                                                                                                                                
Caused by: 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.rpc.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:172)                                                                                                            
        at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:159)                                                                                                                 
        at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:588)                                                                                                                                 
... 34 more

I know that this error mostly occurs if we have version mismatch between your hive and hive-jdbc. But i don't know to resolve it or better said how can i step by step resolve it.

Could anyone helps me?

1 REPLY 1

New Contributor
@bpreachuk

I saw you helped several people with this error, could you help me?