您的位置:首页 > Web前端 > Node.js

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

2016-12-09 20:22 537 查看
以下是执行报错信息

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  分布式 hbase hadoop
相关文章推荐