Loading... ## 1、报错 ![][1] ```css [root@hadoop21 ~]# beeline -u jdbc:hive2://hadoop21:10000 -n root SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/module/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] Connecting to jdbc:hive2://hadoop21:10000 24/05/04 05:34:50 [main]: WARN jdbc.HiveConnection: Failed to connect to hadoop21: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://hadoop21:10000: java.net.ConnectException: 拒绝连接 (Connection refused) (state=08S01,code=0) Beeline version 3.1.2 by Apache Hive ``` ## 2、基础检查 1、查看防火墙端口10000 2、检查HiveServer2配置 3、查看HiveServer2日志 4、权限问题 ## 3、权限问题 如果上面的都没有解决,那么就说HDFS的权限问题 1、检查目录是否存在 ```css hadoop fs -ls /user/hive/warehouse ``` 2、创建目录(如果不存在) ```css hadoop fs -mkdir -p /user/hive/warehouse ``` 3、设置适当的权限 ```css hadoop fs -chmod 777 /user/hive/warehouse ``` ![][2] [1]: https://a-hxin.cn/usr/uploads/2024/05/2527153372.png [2]: https://a-hxin.cn/usr/uploads/2024/05/2101285206.png 最后修改:2024 年 05 月 04 日 © 允许规范转载 打赏 赞赏作者 赞 1 咱们谁跟谁,用不着~