Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 394FA18B4E for ; Mon, 25 May 2015 06:05:23 +0000 (UTC) Received: (qmail 91849 invoked by uid 500); 25 May 2015 06:05:21 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 91760 invoked by uid 500); 25 May 2015 06:05:21 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 91571 invoked by uid 99); 25 May 2015 06:05:21 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2015 06:05:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8DC14C06F0 for ; Mon, 25 May 2015 06:05:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.099 X-Spam-Level: X-Spam-Status: No, score=-0.099 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id kNKCjYtaWe61 for ; Mon, 25 May 2015 06:05:06 +0000 (UTC) Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 5FE2643CCD for ; Mon, 25 May 2015 06:05:06 +0000 (UTC) Received: by obbgf1 with SMTP id gf1so7005509obb.2 for ; Sun, 24 May 2015 23:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=iI+6TUrBloHwuID0wJZyBoc7Jk5Gwk6idZPoXy3J7bY=; b=MQCsUZ/MRzUYuEQb3i2bco4ZXkCNwP8dnYakuCpfC1E62jyJrXhm+iqluBK4c/ocJy K6lCU4I8ag3yIcgecDzWVwQMUp9rg/DHsfVw8Is+oG1fPbfbBXYzMH6Xs1TCS6bwqa5C 8i9bto+b9QtI32U9Zq4+LpTjtZWaNhHjRKFJ53Lfdotn6Op4XhbbnGIczAH5A+bXTeWn i1VgotJTnTOKnK+bR1yvA3RzKFPh16ecQy8QP/np4Q6t2ECHbrjy9Bi62xt3+ML+1VZz ovwwBY2Vks5WyxyvvTEGXySu+n5FPIJHeQTTZj3mlYQenPOZMVoXSwI6Nv2vuR2aA/7c dZSQ== MIME-Version: 1.0 X-Received: by 10.182.112.138 with SMTP id iq10mr16215792obb.38.1432533855176; Sun, 24 May 2015 23:04:15 -0700 (PDT) Received: by 10.202.231.71 with HTTP; Sun, 24 May 2015 23:04:15 -0700 (PDT) In-Reply-To: References: Date: Sun, 24 May 2015 23:04:15 -0700 Message-ID: Subject: Re: ZooKeeper failed to start From: Michi Mutsuzaki To: "user@zookeeper.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It can bind to 3888, but other servers can't connect to it since it's a loopback address. On Sun, May 24, 2015 at 6:55 PM, Da Ma wrote: > Thanks, it=E2=80=99s worked after updating /etc/hosts. > > That=E2=80=99s interesting that cua02/127.0.0.1 is localhost, but it can = not bind (3888) port on it. > > > Regards, > ---- > Da Ma (=E9=A9=AC=E8=BE=BE), PMP=C2=AE | Advisory Software Engineer > Platform Symphony & MapReduce Development & Support, STG, IBM GCG > +86-10-8245 4084 | madaxa@cn.ibm.com | http://www.cguru.net > >> On May 25, 2015, at 07:03, Michi Mutsuzaki wrote: >> >> It looks like these hostnames are resolving to 127.0.0.1 locally. >> >>> 2015-05-24 17:35:40,439 [myid:2] - INFO [Thread 1:QuorumCnxManager$Lis= tener@504] - My election bind port: cua02/127.0.0.1:3888 >> >> You can either configure zookeeper with ip addresses instead of >> hostnames, or make sure these hostnames resolve to correct ip >> addresses. >> >> >> On Sun, May 24, 2015 at 5:08 AM, Da Ma wrote: >>> Hi team, >>> >>> I=E2=80=99m using openJDK 1.6 & 1.7, does zookeeper support them? >>> >>> Regards, >>> ---- >>> Da Ma (=E9=A9=AC=E8=BE=BE), PMP=C2=AE | Advisory Software Engineer >>> Platform Symphony & MapReduce Development & Support, STG, IBM GCG >>> +86-10-8245 4084 | madaxa@cn.ibm.com | http://www.cguru.net >>> >>>> On May 24, 2015, at 17:53, Da Ma wrote: >>>> >>>> Hi team, >>>> >>>> I=E2=80=99m a new player of ZooKeeper; when I following the steps in w= iki to start zookeeper with 3 hosts. It keep reporting the following except= ion; >>>> >>>> 2015-05-24 17:35:40,280 [myid:] - INFO [main:QuorumPeerConfig@103] - = Reading configuration from: /root/zookeeper-3.4.6/bin/../conf/zoo.cfg >>>> 2015-05-24 17:35:40,292 [myid:] - INFO [main:QuorumPeerConfig@340] - = Defaulting to majority quorums >>>> 2015-05-24 17:35:40,297 [myid:2] - INFO [main:DatadirCleanupManager@7= 8] - autopurge.snapRetainCount set to 3 >>>> 2015-05-24 17:35:40,297 [myid:2] - INFO [main:DatadirCleanupManager@7= 9] - autopurge.purgeInterval set to 0 >>>> 2015-05-24 17:35:40,298 [myid:2] - INFO [main:DatadirCleanupManager@1= 01] - Purge task is not scheduled. >>>> 2015-05-24 17:35:40,312 [myid:2] - INFO [main:QuorumPeerMain@127] - S= tarting quorum peer >>>> 2015-05-24 17:35:40,336 [myid:2] - INFO [main:NIOServerCnxnFactory@94= ] - binding to port 0.0.0.0/0.0.0.0:2181 >>>> 2015-05-24 17:35:40,411 [myid:2] - INFO [main:QuorumPeer@959] - tickT= ime set to 2000 >>>> 2015-05-24 17:35:40,411 [myid:2] - INFO [main:QuorumPeer@979] - minSe= ssionTimeout set to -1 >>>> 2015-05-24 17:35:40,411 [myid:2] - INFO [main:QuorumPeer@990] - maxSe= ssionTimeout set to -1 >>>> [root@cua02 zookeeper-3.4.6]# head zookeeper.out -n 100 >>>> 2015-05-24 17:35:40,280 [myid:] - INFO [main:QuorumPeerConfig@103] - = Reading configuration from: /root/zookeeper-3.4.6/bin/../conf/zoo.cfg >>>> 2015-05-24 17:35:40,292 [myid:] - INFO [main:QuorumPeerConfig@340] - = Defaulting to majority quorums >>>> 2015-05-24 17:35:40,297 [myid:2] - INFO [main:DatadirCleanupManager@7= 8] - autopurge.snapRetainCount set to 3 >>>> 2015-05-24 17:35:40,297 [myid:2] - INFO [main:DatadirCleanupManager@7= 9] - autopurge.purgeInterval set to 0 >>>> 2015-05-24 17:35:40,298 [myid:2] - INFO [main:DatadirCleanupManager@1= 01] - Purge task is not scheduled. >>>> 2015-05-24 17:35:40,312 [myid:2] - INFO [main:QuorumPeerMain@127] - S= tarting quorum peer >>>> 2015-05-24 17:35:40,336 [myid:2] - INFO [main:NIOServerCnxnFactory@94= ] - binding to port 0.0.0.0/0.0.0.0:2181 >>>> 2015-05-24 17:35:40,411 [myid:2] - INFO [main:QuorumPeer@959] - tickT= ime set to 2000 >>>> 2015-05-24 17:35:40,411 [myid:2] - INFO [main:QuorumPeer@979] - minSe= ssionTimeout set to -1 >>>> 2015-05-24 17:35:40,411 [myid:2] - INFO [main:QuorumPeer@990] - maxSe= ssionTimeout set to -1 >>>> 2015-05-24 17:35:40,412 [myid:2] - INFO [main:QuorumPeer@1005] - init= Limit set to 10 >>>> 2015-05-24 17:35:40,439 [myid:2] - INFO [Thread-1:QuorumCnxManager$Li= stener@504] - My election bind port: cua02/127.0.0.1:3888 >>>> 2015-05-24 17:35:40,451 [myid:2] - INFO [QuorumPeer[myid=3D2]/0:0:0:0= :0:0:0:0:2181:QuorumPeer@714] - LOOKING >>>> 2015-05-24 17:35:40,452 [myid:2] - INFO [QuorumPeer[myid=3D2]/0:0:0:0= :0:0:0:0:2181:FastLeaderElection@815] - New election. My id =3D 2, propose= d zxid=3D0x0 >>>> 2015-05-24 17:35:40,466 [myid:2] - WARN [WorkerSender[myid=3D2]:Quoru= mCnxManager@382] - Cannot open channel to 1 at election address cua01/9.111= .159.80:3888 >>>> java.net.ConnectException: Connection refused >>>> at java.net.PlainSocketImpl.socketConnect(Native Method) >>>> at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocket= Impl.java:339) >>>> at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlai= nSocketImpl.java:200) >>>> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketIm= pl.java:182) >>>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) >>>> at java.net.Socket.connect(Socket.java:579) >>>> at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne= (QuorumCnxManager.java:368) >>>> at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(Quo= rumCnxManager.java:341) >>>> at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenge= r$WorkerSender.process(FastLeaderElection.java:449) >>>> at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenge= r$WorkerSender.run(FastLeaderElection.java:430) >>>> at java.lang.Thread.run(Thread.java:745) >>>> 2015-05-24 17:35:40,473 [myid:2] - INFO [WorkerReceiver[myid=3D2]:Fas= tLeaderElection@597] - Notification: 1 (message format version), 2 (n.leade= r), 0x0 (n.zxid), 0x1 (n.round), LOOKING (n.state), 2 (n.sid), 0x0 (n.peerE= poch) LOOKING (my state) >>>> 2015-05-24 17:35:40,480 [myid:2] - WARN [WorkerSender[myid=3D2]:Quoru= mCnxManager@382] - Cannot open channel to 3 at election address cua03/9.111= .159.76:3888 >>>> java.net.ConnectException: Connection refused >>>> at java.net.PlainSocketImpl.socketConnect(Native Method) >>>> at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocket= Impl.java:339) >>>> at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlai= nSocketImpl.java:200) >>>> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketIm= pl.java:182) >>>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) >>>> at java.net.Socket.connect(Socket.java:579) >>>> at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne= (QuorumCnxManager.java:368) >>>> at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(Quo= rumCnxManager.java:341) >>>> at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenge= r$WorkerSender.process(FastLeaderElection.java:449) >>>> at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenge= r$WorkerSender.run(FastLeaderElection.java:430) >>>> at java.lang.Thread.run(Thread.java:745) >>>> >>>> >>>> Here=E2=80=99s my configuration: >>>> [root@cua02 zookeeper-3.4.6]# cat conf/zoo.cfg >>>> # The number of milliseconds of each tick >>>> tickTime=3D2000 >>>> # The number of ticks that the initial >>>> # synchronization phase can take >>>> initLimit=3D10 >>>> # The number of ticks that can pass between >>>> # sending a request and getting an acknowledgement >>>> syncLimit=3D5 >>>> # the directory where the snapshot is stored. >>>> # do not use /tmp for storage, /tmp here is just >>>> # example sakes. >>>> dataDir=3D/var/lib/zookeeper/ >>>> # the port at which the clients will connect >>>> clientPort=3D2181 >>>> # the maximum number of client connections. >>>> # increase this if you need to handle more clients >>>> #maxClientCnxns=3D60 >>>> # >>>> # Be sure to read the maintenance section of the >>>> # administrator guide before turning on autopurge. >>>> # >>>> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maint= enance >>>> # >>>> # The number of snapshots to retain in dataDir >>>> #autopurge.snapRetainCount=3D3 >>>> # Purge task interval in hours >>>> # Set to "0" to disable auto purge feature >>>> #autopurge.purgeInterval=3D1 >>>> >>>> >>>> server.1=3Dcua01:2888:3888 >>>> server.2=3Dcua02:2888:3888 >>>> server.3=3Dcua03:2888:3888 >>>> >>>> >>>> The iptables service is stopped. >>>> >>>> And when I check the listening port, no 3888 on the host. >>>> >>>> Can anyone help me on this issue? >>>> >>>> Regards, >>>> ---- >>>> Da Ma (=E9=A9=AC=E8=BE=BE), PMP=C2=AE | Advisory Software Engineer >>>> Platform Symphony & MapReduce Development & Support, STG, IBM GCG >>>> +86-10-8245 4084 | madaxa@cn.ibm.com | http://www.cguru.net >>>> >>> >