【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 文件添加如下内容

<property>
   <name>hadoop.proxyuser.hadoop.hosts</name>
   <value>*</value>
   <description>
        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 the
        group "root" because the user "root" (which usually belonges to "root" group) will
        generally be the user that initially executes the mount on the NFS client system.
        Set this to '*' to allow nfsserver user to proxy any group.
    </description>
</property>
<property>
       <name>hadoop.proxyuser.hadoop.groups</name>
       <value>*</value>
       <description>
               This is the host where the nfs gateway is running. Set this to '*' to allow
               requests from any hosts to be proxied.
       </description>
</property>

hive-site.xml配置如下.

<configuration>
        <property>
                <name>javax.jdo.option.ConnectionURL</name>
                <value>jdbc:mysql://node01:3306/hive?createDatabaseIfNotExist=true</valu
e>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionDriverName</name>
                <value>com.mysql.jdbc.Driver</value>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionUserName</name>
                <value>root</value>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionPassword</name>
                <value>123456</value>
        </property>
        <property>
                <name>hive.cli.print.current.db</name>
                <value>true</value>
        </property>
        <property>
                <name>hive.cli.print.header</name>
                <value>true</value>
        </property>
                     
        <property>
                <name>hive.server2.thrift.bind.host</name>
                <value>node01</value>
        </property>

        <property>
              <name>hive.metastore.warehouse.dir</name>
              <value>/user/hive/warehouse</value>
        </property>

        <property>
              <name>hive.metastore.uris</name>
              <value>thrift://node01:9083</value>
        </property>
</configuration>

修改之后重启hadoop集群和hiveservice2服务

4、检查hdfs上的两个目录权限

hadoop fs -chmod -R 777 /tmp
hadoop fs -chmod -R 777 /user/hive/warehouse

我的问题是第4个,修改权限之后就可以正常连接hive10000端口了

  • 5
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值