Support Questions
Find answers, ask questions, and share your expertise

ssl+kerberos for hiveserver2

ssl+kerberos for hiveserver2

Contributor

we have 2 hiveserver2's , 1 in binary and the other in http..

I am able to connect to the one in binary but couldn't to the one in http mode.

Used the below string:

!connect jdbc:hive2://<host-http-hive>:10001/;ssl=true;transportMode=http;httpPath=gateway/default/hive;

Error:

17/10/30 19:18:28 [main]: ERROR jdbc.HiveConnection: Error opening session
org.apache.thrift.transport.TTransportException: HTTP Response code: 404
        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:154)
        at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:146)
        at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:553)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:171)
        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:52)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:990)
        at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:833)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:791)
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:491)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:474)
        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://<host-http-hive>/;ssl=true;transportMode=http;httpPath=gateway/default/hive;: HTTP Response code: 404 (state=08S01,code=0)


Used below string:

!connect jdbc:hive2://<host-http-hive>:10001/;transportMode=http;httpPath=cliservice;ssl=true;

Error:

17/10/30 19:16:21 [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:154)
        at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:146)
        at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:553)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:171)
        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:52)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:990)
        at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:833)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:791)
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:491)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:474)
        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://<host-http-hive>:10001/;transportMode=http;httpPath=cliservice;ssl=true;sslTrustStore=/etc/security/ssl/hive_keystore.jks;trustStorePassword=changeit;: HTTP Response code: 401 (state=08S01,code=0)
1 REPLY 1
Highlighted

Re: ssl+kerberos for hiveserver2

Contributor
Don't have an account?