Created 03-21-2016 09:45 AM
Hi,
I'm trying to get Hive working with http transport mode with beeline client. We are using HDP 2.3.4.
hive.server2.transport.mode=http
hive.server2.thrift.http.port=10001
hive.server2.thrift.http.path=cliservice
Hiveserver2 does not use any authentication methods.
I'm trying to connect to hiveserver2 using beeline client from the same host where hiveserver2 is running.
I'm getting strange error message and I was not able to find anything relevant from documentation.
Connection error:
beeline> !connect jdbc:hive2://localhost:10001?transportMode=http;httpPath=cliservice
Connecting to jdbc:hive2://localhost:10001?transportMode=http;httpPath=cliservice
Enter username for jdbc:hive2://localhost:10001?transportMode=http;httpPath=cliservice:
Enter password for jdbc:hive2://localhost:10001?transportMode=http;httpPath=cliservice:
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10001?transportMode=http;httpPath=cliservice: Invalid status 72 (state=08S01,code=0) java.sql.SQLException:
Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10001?transportMode=http;httpPath=cliservice: Invalid status 72 at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:210) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:156) 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:497) at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:52) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:980) at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:823) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:781) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:485) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:468) 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:497) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) Caused by: org.apache.thrift.transport.TTransportException: Invalid status 72 at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232) at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:184) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:307) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:185) ... 24 more 0: jdbc:hive2://localhost:10001 (closed)>
NB! I'm able to connect to hiveserver2 if transport mode is configured to use as binary. Also I don't use any username and password on connection using beeline.
Maybe someone can direct me to right direction getting it to work.
Thanks in advance.
Created 03-22-2016 08:00 PM
Hello @Margus Kiting!
From what I could gather, Error 72 is a bad url issue, try:
!connect jdbc:hive2://localhost:10001/default;transportMode=http;httpPath=cliservice
Best Regards,
Alexander Lukyanov
Created 03-22-2016 08:00 PM
Hello @Margus Kiting!
From what I could gather, Error 72 is a bad url issue, try:
!connect jdbc:hive2://localhost:10001/default;transportMode=http;httpPath=cliservice
Best Regards,
Alexander Lukyanov