【Hadoop】Hbase分布式链接出错的问题,启动后不能连上其他节点处理问题。一直报错The node /hbase is not in ZooKeeper.不能同步的问题。

以下是执行报错信息

2016-12-09 19:38:17,672 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
2016-12-09 19:38:17,779 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
2016-12-09 19:38:17,981 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
2016-12-09 19:38:18,284 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
2016-12-09 19:38:18,786 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
2016-12-09 19:38:19,790 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
2016-12-09 19:38:21,797 ERROR [main] client.ConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

ERROR: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

以下是日志信息:

2016-12-09 19:54:33,045 ERROR [main] master.HMasterCommandLine: Master exiting
java.io.IOException: Could not start ZK at requested port of 2181.  ZK was started at port: 2182.  Aborting as clients (e.g. shell) will not be able to find this ZK quorum.
    at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:212)
    at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:137)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
    at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2436)
2016-12-09 19:54:33,058 INFO  [Thread-2] server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:3168 (no session established for client)

很明显说明2181端口被占用了,又由于查了半天不知道这个端口是被哪个占用的,
我个人猜想是不是hadoop中间件系列哪个里面开了这个自带的zookeeper把这个默认的端口给占用了。
又不能确定,所以也不好kill掉这个端口,因此只能修改默认端口:
hbase-site.xml中修改
让2181变成2182

<property>
     <name>hbase.zookeeper.property.clientPort</name>
     <value>2182</value>                                                                                                                                             
</property> 

执行后结果
信息显示

[root@master bin]# ./start-hbase.sh 
starting master, logging to /home/hbase/logs/hbase-root-master-master.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

log显示

[root@master bin]# ./start-hbase.sh 
starting master, logging to /home/hbase/logs/hbase-root-master-master.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

可以看到成功。
同时我们打开web shell,看看之前输入list时候 提示的链接不上端口2181是否还存在。

hbase(main):001:0> list
TABLE                                                                                                                               
0 row(s) in 0.7930 seconds

=> []
hbase(main):002:0> 

顺利执行


另外,在整个过程中,对配置的疑惑也顺便写下来。
第一,
即使是一个master 三个slave
但配置中quorum只能写其他三个slave

<property>
        <name>base.zookeeper.quorum</name>
        <value>slave1,slave2,slave3</value>
</property>

第二,为了保险起见,还是自己配置zookeeper吧……自带的都是坑(泪
那么你还需要修改环境hbase-env.sh。

export HBASE_MANAGES_ZK=false

第三,如果有报错说查看是否zookeeper.znode.parent配置好,
你直接在xml中定义会更好,免得出其他差错。
同时要配合rootserver一起来。

<property>  
    <name>zookeeper.znode.parent</name>  
    <value>/hbase</value>  
    <description>Root ZNode for HBase in ZooKeeper. All of HBase's ZooKeeper  
      files that are configured with a relative path will go under this node.  
      By default, all of HBase's ZooKeeper file path are configured with a  
      relative path, so they will all go under this directory unless changed.  
    </description>  
</property>  
<property>  
    <name>zookeeper.znode.rootserver</name>  
    <value>root-region-server</value>  
    <description>Path to ZNode holding root region location. This is written by  
      the master and read by clients and region servers. If a relative path is  
      given, the parent folder will be ${zookeeper.znode.parent}. By default,  
      this means the root location is stored at /hbase/root-region-server.  
    </description>  
</property> 

第四,你要不是伪分布式,请一定要指定

<property>
    <name>hbase.cluser.distributed</name>
    <value>true</value>
</property>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

乐扣老师lekkoliu

你的鼓励是我最大的科研动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值