无法使用连接字符串连接到直线

xpcnnkqh  于 2021-06-25  发布在  Hive
关注(0)|答案(0)|浏览(217)

我正在为我的直线设置别名。面对一个问题。
如果我登录到 beeline 然后提供以下连接字符串。它要求我的用户名和密码,我可以登录。

!connect jdbc:hive2://<my_domain>:8449/;ssl=true;transportMode=http;httpPath=gateway/emr-cluster-top/hive;sslTrustStore=/etc/pki/ca-trust/extracted/java/cacerts;trustStorePassword=changeit

但是,如果我运行以下命令,它将不起作用。不知道我做错了什么。

beeline -u jdbc:hive2://<my_domain>:8449/;ssl=true;transportMode=http;httpPath=gateway/emr-cluster-top/hive;sslTrustStore=/etc/pki/ca-trust/extracted/java/cacerts;trustStorePassword=changeit -n my_user -=p my_pass

错误

Caused by: java.sql.SQLException: Could not establish connection to jdbc:hive2://<my_domain>:8449/;ssl=true;transportMode=http;httpPath=gateway/emr-cluster-top/hive;sslTrustStore=/etc/pki/ca-trust/extracted/java/cacerts;trustStorePassword=changeit: HTTP Response code: 401
        at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:699)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:200)
        ... 25 more
Caused by: 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.rpc.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:162)
        at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:154)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题