hiveserver2 和beeline_Beeline连接Hiveserver2错误

错误定位

最近给hadoop集群配置了kerberos认证,之后准备配置sentry进行权限管理。安装并启用sentry服务后需要在beeline进行Grant等授权操作。Note that since Hive CLI does not work with HiveServer2, it cannot be used to configure Sentry permissions.

在启用sentry之前基本都用的Hive CLI,所以也没有注意到beeline的问题,在尝试进行连接后beeline出现错误:Error: Could not open client transport with JDBC Uri: jdbc:hive2://test-1:10000/default;: Peer indicated failure: Unsupported mechanism type PLAIN (state=08S01,code=0)

出现这个错误是因为连接时没有提供kerberos的principal信息

应该如下进行连接:

!connect jdbc:hive2://localhost:10000/default;principal=hive/[email protected]

但是仍出现错误:Error: Could not establish connection to jdbc:hive2://test-1:10000/default;principal=hive/[email protected]: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default}) (state=08S01,cod

你可能感兴趣的:(hiveserver2,和beeline)