Member since
08-04-2017
22
Posts
2
Kudos Received
0
Solutions
08-30-2018
03:07 PM
Hi All, In my case, i have configured my cluster with Kerberos, SSL & set the hive transport mode to http. Could you please let me know how the connection string should look like? I'm using the below connection string but still getting the same "HTTP Response code: 401 (state=08S01,code=0)" error: Note: I do have a valid kerberos ticket for accessing the service. # beeline -u "jdbc:hive2://xxx.xxx.local:10001/;principal=hive/xxx.xxx.local@xxx.LOCAL;ssl=true;sslTrustStore=/opt/hdp/security/pki/certs-new/jks/truststore.jks;trustStorePassword=changeit;transportMode=http;httpPath=cliservice" Connecting to jdbc:hive2://xxx.xxx.local:10001/;principal=hive/xxx.xxx.local@xxx.LOCAL;ssl=true;sslTrustStore=/opt/hdp/security/pki/certs-new/jks/truststore.jks;trustStorePassword=changeit;transportMode=http;httpPath=cliservice
18/08/30 13:11:33 [main]: ERROR jdbc.HiveConnection: Error opening session
org.apache.thrift.transport.TTransportException: HTTP Response code: 401
at org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:262)
at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:313)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
at org.apache.hive.service.cli.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:158)
at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:150)
at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:622)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:221)
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:146)
at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:211)
at org.apache.hive.beeline.Commands.connect(Commands.java:1204)
at org.apache.hive.beeline.Commands.connect(Commands.java:1100)
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:54)
at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:998)
at org.apache.hive.beeline.BeeLine.initArgs(BeeLine.java:717)
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:779)
at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:493)
at org.apache.hive.beeline.BeeLine.main(BeeLine.java:476)
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)
Error: Could not establish connection to jdbc:hive2://xxx.xxx.local:10001/;principal=hive/xxx.xxx.local@xxx.LOCAL;ssl=true;sslTrustStore=/opt/hdp/security/pki/certs-new/jks/truststore.jks;trustStorePassword=changeit;transportMode=http;httpPath=cliservice: HTTP Response code: 401 (state=08S01,code=0)
Beeline version 1.2.1000.2.6.5.0-292 by Apache Hive
0: jdbc:hive2://xxx.xxx.local:10001/ (closed)>
... View more
08-04-2017
06:34 PM
1 Kudo
So indeed it was a corrupted client, in that case please accept my first answer.
... View more