连接到hive2时出现直线错误

sg3maiej  于 2021-06-02  发布在  Hadoop
关注(0)|答案(2)|浏览(331)

这是我的命令!连接jdbc:hive2://localhost:10000
我犯了这个错误
无法使用jdbc uri打开客户端传输:jdbc:hive2://localhost:10000:null(状态=08s01,代码=0)
如何解决?

hfsqlsce

hfsqlsce1#

检查配置单元服务器是否在http模式下运行。

vawmfj5a

vawmfj5a2#

您需要像下面这样设置身份验证命令才能转到beeline。
它取决于hive-site.xml中的hive.server2.authentication属性值
嵌入式模式:

!connect jdbc:hive2://

sasl身份验证:
如果hive.server2.authentication=sasl,则按如下所示直线开始

!connect jdbc:hive2://<host>:<port>/<db>

nosasl身份验证:hive.server2.authentication=nosasl

!connect jdbc:hive2://<host>:<port>/<db>;auth=noSasl

http协议mode:hive.server2.authentication=http

!connect jdbc:hive2://<host>:<port>/<db>;hive.server2.transport.mode=http;

只需转到属性并根据上述值开始直线。它将无错误地开始
希望这真的对你有帮助

相关问题