问题描述
链接beeline连接串失败,显示Peer indicated failure: Unsupported mechanism type PLAIN (state=,code=0)
根因
报错是认证方式不对的报错
相关知识
开启或未开启安全模式或认证模式不同,beeline连接串的写法也不同,具体详见:https://community.transwarp.cn/thread?topicId=276
解决步骤
步骤一 配置项输入auth查看认证模式是什么
服务建好后hive.server2.authentication配置项默认为none,未开启安全时可以登录但是如果开启安全的话使用none则无法登录
步骤二 修改改配置项为LDAP,修改后需要重新配置并进行重启
步骤三 如果未修改过hive的默认密码,需要到Guardian平台租户页面重置hive密码
步骤四 重新使用beeline连接串登录
# source /root/TDH-Client/init.sh
# beeline -u "jdbc:hive2://localhost:10000/default" -n <username> -p <password>