当前位置:   article > 正文

Could not open client transport with JDBC Uri: jdbc:hive2://node03:10000: java.net.ConnectException:_[ 08s01] could not open client transport with jdbc

[ 08s01] could not open client transport with jdbc uri: jdbc:hive2://cdh2.da

启动beeline连接hive报错:

Could not open client transport with JDBC Uri: jdbc:hive2://node03:10000: java.net.ConnectException:

原因是hiveserver2没有启动起来

beeline连接hive命令(注意我的节点名node03,其他人可能根据自己设置的不同):!connect jdbc:hive2://node03:10000

启动hiveserver2命令:hive --service hiveserver2

你以为这样就结束了吗?

but此时输入用户名,又被拒绝连接了(Excuse me?此处脑补表情包)

后来用jps命令查看:看此时启动beeline的那台服务器是不是两个RunJar(一个RunJar是metastore(元数据),一个RunJar是hiveserver2)

如果是三个用kill -9 (进程号) 全部杀死 然后

启动MySQL((1)service mysqld start   (2)mysql -uroot -p******)

启动yarn(start-yarn.sh)只在一台上启动 (备注一下启动yarn(start-yarn.sh)和启动hdfs (start-dfs.sh)是由于hive的原因启动)

启动hive     cd /export/servers/hive  或  cd /export/servers/apache-hive-2.1.1-bin

                   启动元数据 nohup bin/hive --service metastore &                                 (用 cat nohup.out 命令查看启动日志有无报错)

                   启动hiveserver2 nohup bin/hive --service hiveserver2 &                      (用 cat nohup.out 命令查看启动日志有无报错)

最后终于启动成功了(罪魁祸首是MySQL没启动QWQ)

总结:

温馨提示:

1.查看hdfs启动没(start-dfs.sh)

2.查看yarn启动没(start-yarn.sh)

3.查看MySQL启动没((1)service mysqld start     (2)mysql -uroot -p******)(和hive,beeline在同一台服务器node03启动)

4.查看元数据启动没( 前台启动:hive --service metastore  后台启动:nohup bin/hive --service metastore &)(和hive,beeline在同一台服务器node03启动)

5.查看hiveserver2启动没(前台启动:hive --service hiveserver2  后台启动:nohup bin/hive --service hiverserver2 &)(和hive,beeline在同一台服务器node03启动)

6.输入命令:beeline     (如何配置beeline的环境变量 看下一篇beeline工具连接hive)

7.输入命令:!connect jdbc:hive2://node03:10000

(ps:查看进程命令 ps -ef | grep (名字)                 杀死进程命令 kill -9 (进程号)             查看启动元数据(metastore),hiveserver2启动日志cat nohup.out))

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/424445
推荐阅读
相关标签
  

闽ICP备14008679号