【hive】hive Could not connect to node01:10000
Could not connect to node01:10000
原因
无法连接端口node01节点的10000端口
解决
1、检查是否开启hiveserver2服务
hive --service hiveserver2 &
2、检查10000端口是否被占用
netstat -anop | grep 10000
端口被占用就把10000端口杀死重新开启hiveservice2服务
3、检查配置文件
在 Hadoop的 core-site.xml 文件添加如下内容
hadoop.proxyuser.hadoop.hosts * The 'nfsserver' user is allowed to proxy all members of the 'users-group1' and'users-group2' groups. Note that in most cases you will need to include thegroup "root" because the user "root" (which usually belonges to "root" group) willgenerally be the user that initially executes the mount on the NFS client system.Set this to '*' to allow nfsserver user to proxy any group.
hadoop.proxyuser.hadoop.groups * This is the host where the nfs gateway is running. Set this to '*' to allowrequests from any hosts to be proxied.
hive-site.xml配置如下.
javax.jdo.option.ConnectionURL jdbc:mysql://node01:3306/hive?createDatabaseIfNotExist=true javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName root javax.jdo.option.ConnectionPassword 123456 hive.cli.print.current.db true hive.cli.print.header true hive.server2.thrift.bind.host node01 hive.metastore.warehouse.dir /user/hive/warehouse hive.metastore.uris thrift://node01:9083
修改之后重启hadoop集群和hiveservice2服务
4、检查hdfs上的两个目录权限
hadoop fs -chmod -R 777 /tmp
hadoop fs -chmod -R 777 /user/hive/warehouse
我的问题是第4个,修改权限之后就可以正常连接hive10000端口了
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
