ZooKeeper集群不能分配地址

环境:

VirtualBox:5.1.6

Centos:7

Java:1.8

Zookeeper:3.4.9

VirtualBox搭建的三个Zookeeper环境。

三个虚拟机的单机模式都正常:

[[email protected]_1 data]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4.9/bin/../conf/zoo.cfg
Mode: standalone

从centos_1(192.168.1.156)中 ping centos_2(192.168.1.158)正常:

[[email protected]_1 data]# ping -c 2 192.168.1.158
PING 192.168.1.158 (192.168.1.158) 56(84) bytes of data.
64 bytes from 192.168.1.158: icmp_seq=1 ttl=64 time=0.603 ms
64 bytes from 192.168.1.158: icmp_seq=2 ttl=64 time=0.795 ms

--- 192.168.1.158 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.603/0.699/0.795/0.096 ms

从centos_2(192.168.1.158)中 ping centos_3(192.168.1.159)正常:

[[email protected]_2 data]# ping -c 2 192.168.1.159
PING 192.168.1.159 (192.168.1.159) 56(84) bytes of data.
64 bytes from 192.168.1.159: icmp_seq=1 ttl=64 time=0.561 ms
64 bytes from 192.168.1.159: icmp_seq=2 ttl=64 time=1.10 ms

--- 192.168.1.159 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.561/0.830/1.100/0.271 ms

配置文件:

# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5 
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/opt/zookeeper-3.4.9/data
 
# 日志文件
dataLogDir=/opt/zookeeper-3.4.9/logs
 
# the port at which the clients will connect
clientPort=2181 
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60 
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1 
server.1=centos_1:2888:3888server.2=centos_2:2888:3888server.3=centos_3:2888:3888

集群不能正常启动,下面是具体的log:

[[email protected]_3 data]# cat zookeeper.out 2016-11-03 19:33:18,609 [myid:] - INFO  [main:[email protected]] - Reading configuration from: /opt/zookeeper-3.4.9/bin/../conf/zoo.cfg
2016-11-03 19:33:18,625 [myid:] - INFO  [main:[email protected]] - Resolved hostname: centos_3 to address: centos_3/192.168.1.1592016-11-03 19:33:33,628 [myid:] - INFO  [main:[email protected]] - Resolved hostname: centos_2 to address: centos_2/220.250.64.2252016-11-03 19:33:38,633 [myid:] - INFO  [main:[email protected]] - Resolved hostname: centos_1 to address: centos_1/220.250.64.2252016-11-03 19:33:38,634 [myid:] - INFO  [main:[email protected]] - Defaulting to majority quorums
2016-11-03 19:33:38,643 [myid:1] - INFO  [main:[email protected]] - autopurge.snapRetainCount set to 32016-11-03 19:33:38,646 [myid:1] - INFO  [main:[email protected]] - autopurge.purgeInterval set to 02016-11-03 19:33:38,646 [myid:1] - INFO  [main:[email protected]] - Purge task is not scheduled.
2016-11-03 19:33:38,663 [myid:1] - INFO  [main:[email protected]] - Starting quorum peer
2016-11-03 19:33:38,678 [myid:1] - INFO  [main:[email protected]] - binding to port 0.0.0.0/0.0.0.0:21812016-11-03 19:33:38,725 [myid:1] - INFO  [main:[email protected]] - tickTime set to 20002016-11-03 19:33:38,725 [myid:1] - INFO  [main:[email protected]] - minSessionTimeout set to -1
2016-11-03 19:33:38,725 [myid:1] - INFO  [main:[email protected]] - maxSessionTimeout set to -1
2016-11-03 19:33:38,725 [myid:1] - INFO  [main:[email protected]] - initLimit set to 102016-11-03 19:33:38,742 [myid:1] - INFO  [main:[email protected]] - currentEpoch not found! Creating with a reasonable default of 0. This should only happen when you are upgrading your installation
2016-11-03 19:33:38,765 [myid:1] - INFO  [main:[email protected]] - acceptedEpoch not found! Creating with a reasonable default of 0. This should only happen when you are upgrading your installation
2016-11-03 19:33:38,778 [myid:1] - INFO  [ListenerThread:[email protected]] - My election bind port: centos_1/220.250.64.225:38882016-11-03 19:33:38,780 [myid:1] - ERROR [centos_1/220.250.64.225:3888:[email protected]] - Exception while listening
java.net.BindException: Cannot assign requested address (Bind failed)
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
	at java.net.ServerSocket.bind(ServerSocket.java:375)
	at java.net.ServerSocket.bind(ServerSocket.java:329)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener.run(QuorumCnxManager.java:537)
2016-11-03 19:33:38,784 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - LOOKING
2016-11-03 19:33:38,785 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - New election. My id =  1, proposed zxid=0x0
2016-11-03 19:33:38,790 [myid:1] - INFO  [WorkerReceiver[myid=1]:[email protected]] - Notification: 1 (message format version), 1 (n.leader), 0x0 (n.zxid), 0x1 (n.round), LOOKING (n.state), 1 (n.sid), 0x0 (n.peerEpoch) LOOKING (my state)
2016-11-03 19:33:39,782 [myid:1] - INFO  [centos_1/220.250.64.225:3888:[email protected]] - My election bind port: centos_1/220.250.64.225:38882016-11-03 19:33:39,782 [myid:1] - ERROR [centos_1/220.250.64.225:3888:[email protected]] - Exception while listening
java.net.BindException: Cannot assign requested address (Bind failed)
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
	at java.net.ServerSocket.bind(ServerSocket.java:375)
	at java.net.ServerSocket.bind(ServerSocket.java:329)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener.run(QuorumCnxManager.java:537)
2016-11-03 19:33:40,784 [myid:1] - INFO  [centos_1/220.250.64.225:3888:[email protected]] - My election bind port: centos_1/220.250.64.225:38882016-11-03 19:33:40,785 [myid:1] - ERROR [centos_1/220.250.64.225:3888:[email protected]] - Exception while listening
java.net.BindException: Cannot assign requested address (Bind failed)
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
	at java.net.ServerSocket.bind(ServerSocket.java:375)
	at java.net.ServerSocket.bind(ServerSocket.java:329)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener.run(QuorumCnxManager.java:537)
2016-11-03 19:33:41,785 [myid:1] - INFO  [centos_1/220.250.64.225:3888:[email protected]] - Leaving listener
2016-11-03 19:33:41,786 [myid:1] - ERROR [centos_1/220.250.64.225:3888:[email protected]] - As I‘m leaving the listener thread, I won‘t be able to participate in leader election any longer: centos_1/220.250.64.225:38882016-11-03 19:33:43,795 [myid:1] - WARN  [WorkerSender[myid=1]:[email protected]] - Cannot open channel to 2 at election address centos_2/220.250.64.225:3888java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:354)
	at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:452)
	at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:433)
	at java.lang.Thread.run(Thread.java:745)
2016-11-03 19:33:43,796 [myid:1] - INFO  [WorkerSender[myid=1]:[email protected]] - Resolved hostname: centos_2 to address: centos_2/220.250.64.2252016-11-03 19:33:43,797 [myid:1] - WARN  [WorkerSender[myid=1]:[email protected]] - Cannot open channel to 3 at election address centos_3/192.168.1.159:3888java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:354)
	at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:452)
	at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:433)
	at java.lang.Thread.run(Thread.java:745)
2016-11-03 19:33:43,798 [myid:1] - INFO  [WorkerSender[myid=1]:[email protected]] - Resolved hostname: centos_3 to address: centos_3/192.168.1.1592016-11-03 19:33:48,802 [myid:1] - WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Cannot open channel to 2 at election address centos_2/220.250.64.225:3888java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)
2016-11-03 19:33:48,803 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Resolved hostname: centos_2 to address: centos_2/220.250.64.2252016-11-03 19:33:48,804 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Notification time out: 4002016-11-03 19:33:54,206 [myid:1] - WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Cannot open channel to 2 at election address centos_2/220.250.64.225:3888java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)
2016-11-03 19:33:54,208 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Resolved hostname: centos_2 to address: centos_2/220.250.64.2252016-11-03 19:33:54,209 [myid:1] - WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Cannot open channel to 3 at election address centos_3/192.168.1.159:3888java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)
2016-11-03 19:33:54,212 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Resolved hostname: centos_3 to address: centos_3/192.168.1.1592016-11-03 19:33:54,212 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Notification time out: 8002016-11-03 19:34:00,021 [myid:1] - WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Cannot open channel to 2 at election address centos_2/220.250.64.225:3888java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)
2016-11-03 19:34:00,022 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Resolved hostname: centos_2 to address: centos_2/220.250.64.2252016-11-03 19:34:00,024 [myid:1] - WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Cannot open channel to 3 at election address centos_3/192.168.1.159:3888java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)
2016-11-03 19:34:00,024 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Resolved hostname: centos_3 to address: centos_3/192.168.1.1592016-11-03 19:34:00,025 [myid:1] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Notification time out: 16002016-11-03 19:34:06,632 [myid:1] - WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] - Cannot open channel to 2 at election address centos_2/220.250.64.225:3888java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)

原因

因为安装的是min版,所以,不能根据hostname正常解析ip.

时间: 2024-11-08 19:13:04

ZooKeeper集群不能分配地址的相关文章

Solr集群的搭建以及使用(内涵zookeeper集群的搭建指南)

1   什么是SolrCloud SolrCloud(solr 云)是Solr提供的分布式搜索方案,当你需要大规模,容错,分布式索引和检索能力时使用 SolrCloud.当一个系统的索引数据量少的时候是不需要使用SolrCloud的,当索引量很大,搜索请求并发很高,这时需要使 用SolrCloud来满足这些需求. SolrCloud是基于Solr和Zookeeper的分布式搜索方案,它的主要思想是使用Zookeeper作为集群的配置信息中心. 它有几个特色功能: 1)集中式的配置信息 2)自动容

(27)zookeeper的集群角色分配原理

1.zookeeper集群机制 半数机制:集群中半数以上机器存活,集群可用. zookeeper适合装在奇数台机器上. Zookeeper集群的节点角色:  Leader 和  follower  (Observer) 只要集群中有半数以上节点存活,集群就能提供正常服务. 2.zookeeper的集群结构 为了维持高可靠性,zookeeper集群内部有多个节点.所有节点中只有一个会成为leader,其余的角色都是follower.zookeeper的配置文件中需要配置的内容包括集群中有哪些机器以

ZooKeeper集群的安装、配置、高可用测试

Dubbo注册中心集群Zookeeper-3.4.6 Dubbo建议使用Zookeeper作为服务的注册中心. Zookeeper集群中只要有过半的节点是正常的情况下,那么整个集群对外就是可用的.正是基于这个特性,要将ZK集群的节点数量要为奇数(2n+1:如3.5.7个节点)较为合适. ZooKeeper与Dubbo服务集群架构图 服务器1:192.168.1.81  端口:2181.2881.3881 服务器2:192.168.1.82  端口:2182.2882.3882 服务器3:192.

ZooKeeper 集群的安装、配置

Zookeeper 集群中只要有过半的节点是正常的情况下,那么整个集群对外就是可用的.正是基于这个 特性,要将 ZK 集群的节点数量要为奇数(2n+1:如 3.5.7 个节点)较为合适. 服务器IP和端口规划: 服务器 1:192.168.1.11 端口:2181.2888.3888 服务器 2:192.168.1.12 端口:2181.2888.3888 服务器 3:192.168.1.13 端口:2181.2888.3888 1. 修改操作系统的/etc/hosts 文件,添加 IP 与主机

kafka 、 zookeeper 集群(二)

一.zookeeper集群安装 要求:zookeeper的 jdk 要 6以上 zookeeper生产环境版本为 3.4.8 1.首先编辑/etc/hosts在5台都加入:10.0.50.10 zk-kafka0110.0.50.11 zk-kafka0210.0.50.12 zk-kafka0310.0.50.13 zk-kafka0410.0.50.14 zk-kafka05 2.更改hostname 1.vim /etc/sysconfig/network2.hostname zk-kaf

构建高可用ZooKeeper集群

ZooKeeper 是 Apache 的一个顶级项目,为分布式应用提供高效.高可用的分布式协调服务,提供了诸如数据发布/订阅.负载均衡.命名服务.分布式协调/通知和分布式锁等分布式基础服务.由于 ZooKeeper 便捷的使用方式.卓越的性能和良好的稳定性,被广泛地应用于诸如 Hadoop.HBase.Kafka 和 Dubbo 等大型分布式系统中. 本文的目标读者是对 ZooKeeper 有一定了解的技术人员,将从 ZooKeeper 运行模式.集群组成.容灾和水平扩容四方面逐步深入,最终构建

完全分布式ZooKeeper集群和Kafka集群的搭建和使用

自己使用的版本为zookeeper-3.4.7.tar.gz和kafka_2.10-0.9.0.0.tgz.首先要安装JDK(jdk-7u9-linux-i586.tar.gz)和SSH,IP地址的分配为Kafka1(192.168.56.136),Kafka2(192.168.56.137),Kafka3(192.168.56.138).下面主要介绍SSH的安装,ZooKeeper和Kafka集群的搭建和使用. 一. SSH的安装 (1)apt-get install ssh (2)/etc/

ZooKeeper 集群的安装、配置---Dubbo 注册中心

ZooKeeper 集群的安装.配置.高可用测试 Dubbo 注册中心集群 Zookeeper-3.4.6 Dubbo 建议使用 Zookeeper 作为服务的注册中心. Zookeeper 集群中只要有过半的节点是正常的情况下,那么整个集群对外就是可用的.正是基于这个 特性,要将 ZK 集群的节点数量要为奇数(2n+1:如 3.5.7 个节点)较为合适. 服务器 1:192.168.1.11  端口:2181.2881.3881 服务器 2:192.168.1.12  端口:2182.2882

构建高可用ZooKeeper集群(转载)

ZooKeeper 是 Apache 的一个顶级项目,为分布式应用提供高效.高可用的分布式协调服务,提供了诸如数据发布/订阅.负载均衡.命名服务.分布式协调/通知和分布式锁等分布式基础服务.由于 ZooKeeper 便捷的使用方式.卓越的性能和良好的稳定性,被广泛地应用于诸如 Hadoop.HBase.Kafka 和 Dubbo 等大型分布式系统中. 本文的目标读者是对 ZooKeeper 有一定了解的技术人员,将从 ZooKeeper 运行模式.集群组成.容灾和水平扩容四方面逐步深入,最终构建