Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper, mail # user - Re: 答复: Starting zookeeper in replicated mode


Copy link to this message
-
Re: 答复: Starting zookeeper in replicated mode
Sigehere 2013-02-02, 07:56
hello friend,
 i have done changes in iptables as follow:

$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:3888
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:2888
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:2181
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:3888
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:2888
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:2181
ACCEPT     all  --  pc-ubuntu1204        swapnil-lp          
ACCEPT     all  --  swapnil-lp           pc-ubuntu1204      

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  
but my zookeeper replication is not working what is problem can you help me
please.
$ java -cp
zookeeper-3.4.5.jar:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf
org.apache.zookeeper.server.quorum.QuorumPeerMain conf/zoo.cfg
2013-02-02 13:21:18,723 [myid:] - INFO  [main:QuorumPeerConfig@101] -
Reading configuration from: conf/zoo.cfg
2013-02-02 13:21:18,729 [myid:] - WARN  [main:QuorumPeerConfig@287] - No
server failure will be tolerated. You need at least 3 servers.
2013-02-02 13:21:18,729 [myid:] - INFO  [main:QuorumPeerConfig@334] -
Defaulting to majority quorums
2013-02-02 13:21:18,732 [myid:1] - INFO  [main:DatadirCleanupManager@78] -
autopurge.snapRetainCount set to 3
2013-02-02 13:21:18,732 [myid:1] - INFO  [main:DatadirCleanupManager@79] -
autopurge.purgeInterval set to 0
2013-02-02 13:21:18,732 [myid:1] - INFO  [main:DatadirCleanupManager@101] -
Purge task is not scheduled.
2013-02-02 13:21:18,769 [myid:1] - INFO  [main:QuorumPeerMain@127] -
Starting quorum peer
2013-02-02 13:21:18,781 [myid:1] - INFO  [main:NIOServerCnxnFactory@94] -
binding to port 0.0.0.0/0.0.0.0:2181
2013-02-02 13:21:18,794 [myid:1] - INFO  [main:QuorumPeer@913] - tickTime
set to 2000
2013-02-02 13:21:18,794 [myid:1] - INFO  [main:QuorumPeer@933] -
minSessionTimeout set to -1
2013-02-02 13:21:18,795 [myid:1] - INFO  [main:QuorumPeer@944] -
maxSessionTimeout set to -1
2013-02-02 13:21:18,795 [myid:1] - INFO  [main:QuorumPeer@959] - initLimit
set to 5
2013-02-02 13:21:18,804 [myid:1] - INFO  [main:FileSnap@83] - Reading
snapshot /home/hduser/zookeeperdata/version-2/snapshot.0
2013-02-02 13:21:18,810 [myid:1] - INFO
[Thread-1:QuorumCnxManager$Listener@486] - My election bind port:
0.0.0.0/0.0.0.0:3888
2013-02-02 13:21:18,821 [myid:1] - INFO
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumPeer@670] - LOOKING
2013-02-02 13:21:18,823 [myid:1] - INFO
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@740] - New election. My
id =  1, proposed zxid=0x0
2013-02-02 13:21:18,824 [myid:1] - INFO
[WorkerReceiver[myid=1]:FastLeaderElection@542] - Notification: 1
(n.leader), 0x0 (n.zxid), 0x1 (n.round), LOOKING (n.state), 1 (n.sid), 0x1
(n.peerEPoch), LOOKING (my state)
2013-02-02 13:21:18,827 [myid:1] - WARN
[WorkerSender[myid=1]:QuorumCnxManager@368] - Cannot open channel to 2 at
election address pc-ubuntu1204/192.168.2.2:3888
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354)
        at
org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:327)
        at
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:393)
        at
org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:365)
        at java.lang.Thread.run(Thread.java:679)
2013-02-02 13:21:19,027 [myid:1] - WARN
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@368] - Cannot open channel
to 2 at election address pc-ubuntu1204/192.168.2.2:3888
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354)
        at
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:388)
        at
org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:765)
        at
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:716)
2013-02-02 13:21:19,029 [myid:1] - INFO
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@774] - Notification time
out: 400
2013-02-02 13:21:19,431 [myid:1] - WARN
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@368] - Cannot open channel
to 2 at election address pc-ubuntu1204/192.168.2.2:3888
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
        at
java.net.AbstractPlainSocketImpl.connect(Abstra