godatadriven / godatadriven-blog

Sources to our blog
6 stars 2 forks source link

I use the beeline client to connect the hiveserver2 it occured some problem. #7

Closed wpf5511 closed 9 years ago

wpf5511 commented 9 years ago

ERROR jdbc.HiveConnection: Error opening session org.apache.thrift.TApplicationException: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null) at org.apache.thrift.TApplicationException.read(TApplicationException.java:108) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71) 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:415) at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:193) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:187) at org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:145) at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:186) at org.apache.hive.beeline.Commands.connect(Commands.java:959) at org.apache.hive.beeline.Commands.connect(Commands.java:880) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:44) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:801) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:659) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:368) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:351) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) where the problem is

gglanzani commented 9 years ago

Could you paste the input you entered to get this message and your hadoop config file (not inline)?

wpf5511 commented 9 years ago

screenshot from 2014-12-29 08 49 00

screenshot from 2014-12-29 08 49 16 Hadoop configuration in the remote server: screenshot from 2014-12-29 08 59 03 screenshot from 2014-12-29 08 59 59

gglanzani commented 9 years ago

Please re-read my comment above.

wpf5511 commented 9 years ago

Are you mean my local hadoop configuration?but i only use hive as a client ,doesn't it use my own hadoop configuration?

gglanzani commented 9 years ago

I mean please paste stuff that I (we) can copy-paste, and don't do it inline if it's a lot.

The configuration properties of HiveServer2 are also needed. Look at this thread (not only the first answer, and be sure to read the comment) for possible causes.