问题
在启动hive链接beeline客户端时,无法连接,明明两个runjar都有了 连接beeline失败:
21/10/05 20:44:29 [main]: WARN jdbc.HiveConnection: Failed to connect to hadoop102:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2:
Beeline version 3.1.2 by Apache Hive
直接使用hive也失败,但是看到这一句报错,可能是要关闭hadoop安全模式
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create directory /tmp/hive/atguigu/78f47514-314d-4c6c-bc04-e16dfbba19c9. Name node is in safe mode.
解决方法
hadoop dfsadmin -safemode leave
即可退出安全模式。
再次连接
成功!
若果还不行,可以试试删除日志文件,可能是集群时间不对应的问题。
|