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 DBDA310731 for ; Sun, 1 Sep 2013 16:15:39 +0000 (UTC) Received: (qmail 20563 invoked by uid 500); 1 Sep 2013 16:15:38 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 20503 invoked by uid 500); 1 Sep 2013 16:15:37 -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 20494 invoked by uid 99); 1 Sep 2013 16:15:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Sep 2013 16:15:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of german.blanco.blanco@gmail.com designates 74.125.82.177 as permitted sender) Received: from [74.125.82.177] (HELO mail-we0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Sep 2013 16:15:29 +0000 Received: by mail-we0-f177.google.com with SMTP id q55so3004874wes.22 for ; Sun, 01 Sep 2013 09:15:09 -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; bh=KL0CIrgsGCC9XRt6ZXqRJJn0PuZ/dGANWBsfAkU2XMY=; b=z47yBFagIv2VEY1kWq5wC5fsPdukDa+gbz6nGCOhq+xwmX3V7Jt9KaD1D8FPTNwc/g kSG/JAVqd+OaJFOgzRvi+zIXy7ZWLry7+1Qz4UAr4eIAsw8iYgkrSDYb0pBQBKqUgXjA 6QlW/WdY53QnBOyXZX+GevDizpgPztL1fhUIGyrHJwvHy8MswHtOE/4+BWDOTJQ9+vPM YpFpPsPS+5rJYu0L3HammgFt27FeHtRFbHoPNvOQbI9ZQfh8NaG9iI+RDJB16INGN6/7 abyNU8F5QZ4etf7xE/ioQymAKKXPKu8R4UFiAdFVPQn9c706sdtHCSeVaIJ6DVRyp3Rp 0Yqw== MIME-Version: 1.0 X-Received: by 10.180.93.194 with SMTP id cw2mr10125546wib.26.1378052109045; Sun, 01 Sep 2013 09:15:09 -0700 (PDT) Received: by 10.217.1.15 with HTTP; Sun, 1 Sep 2013 09:15:08 -0700 (PDT) In-Reply-To: References: Date: Sun, 1 Sep 2013 18:15:08 +0200 Message-ID: Subject: Re: zookeeper on ec2 problem From: German Blanco To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=f46d043be1647114a004e554c267 X-Virus-Checked: Checked by ClamAV on apache.org --f46d043be1647114a004e554c267 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hello Yi Yang, there is a strange thing in your configuration file. You are running 3 servers, right? In that case you shouldn't have a "localhost" in the configuration, you should have the IP that is used to connect from the other servers. Normally that list should be the same in all three servers. I don't think clients will be able to connect unless the leader election between the servers completes, and this mistake in the configuration might be a problem for that. Please check the log of your servers and see if the leader election has finished and if they receive the connection attempt from the client. You could also try the 4 letter word command on each server and see what you get. Regards, Germ=E1n. On Sat, Aug 31, 2013 at 7:09 AM, Yi Jiang wrote: > Hi, Everyone, > > I am recently setting up zookeeper on ec2 > > I have followed the suggestion that using the internal ip of ec2, but it > still shows up the error: > > > > root@ip-172-31-15-65:/home/yjiang/zookeeper-3.4.5/bin# ./zkServer.sh > status > > JMX enabled by default > > Using config: /home/yjiang/zookeeper-3.4.5/bin/../conf/zoo.cfg > > Error contacting service. It is probably not running. > > > > But the instance is running in the background. > > Then when I use the ./zkCli.sh =96server server-ip:2181 command, it shows > below > > > > > > root@ip-172-31-15-65:/home/yjiang/zookeeper-3.4.5/bin# ./zkCli.sh -server > ip-172-31-15-68.us-west-2.compute.internal:2181 > > Connecting to ip-172-31-15-68.us-west-2.compute.internal:2181 > > 2013-08-31 05:05:45,823 [myid:] - INFO [main:Environment@100] - Client > environment:zookeeper.version=3D3.4.5-1392090, built on 09/30/2012 17:52 = GMT > > 2013-08-31 05:05:45,833 [myid:] - INFO [main:Environment@100] - Client > environment:host.name=3Dip-172-31-15-65.us-west-2.compute.internal > > 2013-08-31 05:05:45,833 [myid:] - INFO [main:Environment@100] - Client > environment:java.version=3D1.7.0_25 > > 2013-08-31 05:05:45,834 [myid:] - INFO [main:Environment@100] - Client > environment:java.vendor=3DOracle Corporation > > 2013-08-31 05:05:45,835 [myid:] - INFO [main:Environment@100] - Client > environment:java.home=3D/usr/lib/jvm/java-7-oracle/jre > > 2013-08-31 05:05:45,836 [myid:] - INFO [main:Environment@100] - Client > environment:java.class.path=3D/home/yjiang/zookeeper-3.4.5/bin/../build/c= lasses:/home/yjiang/zookeeper-3.4.5/bin/../build/lib/*.jar:/home/yjiang/zoo= keeper-3.4.5/bin/../lib/slf4j-log4j12-1.6.1.jar:/home/yjiang/zookeeper-3.4.= 5/bin/../lib/slf4j-api-1.6.1.jar:/home/yjiang/zookeeper-3.4.5/bin/../lib/ne= tty-3.2.2.Final.jar:/home/yjiang/zookeeper-3.4.5/bin/../lib/log4j-1.2.15.ja= r:/home/yjiang/zookeeper-3.4.5/bin/../lib/jline-0.9.94.jar:/home/yjiang/zoo= keeper-3.4.5/bin/../zookeeper-3.4.5.jar:/home/yjiang/zookeeper-3.4.5/bin/..= /src/java/lib/*.jar:/home/yjiang/zookeeper-3.4.5/bin/../conf:/usr/lib/jvm/j= ava-7-oracle/lib > > 2013-08-31 05:05:45,837 [myid:] - INFO [main:Environment@100] - Client > environment:java.library.path=3D/usr/java/packages/lib/amd64:/usr/lib64:/= lib64:/lib:/usr/lib > > 2013-08-31 05:05:45,837 [myid:] - INFO [main:Environment@100] - Client > environment:java.io.tmpdir=3D/tmp > > 2013-08-31 05:05:45,838 [myid:] - INFO [main:Environment@100] - Client > environment:java.compiler=3D > > 2013-08-31 05:05:45,839 [myid:] - INFO [main:Environment@100] - Client > environment:os.name=3DLinux > > 2013-08-31 05:05:45,839 [myid:] - INFO [main:Environment@100] - Client > environment:os.arch=3Damd64 > > 2013-08-31 05:05:45,840 [myid:] - INFO [main:Environment@100] - Client > environment:os.version=3D3.2.0-40-virtual > > 2013-08-31 05:05:45,841 [myid:] - INFO [main:Environment@100] - Client > environment:user.name=3Droot > > 2013-08-31 05:05:45,842 [myid:] - INFO [main:Environment@100] - Client > environment:user.home=3D/root > > 2013-08-31 05:05:45,842 [myid:] - INFO [main:Environment@100] - Client > environment:user.dir=3D/home/yjiang/zookeeper-3.4.5/bin > > 2013-08-31 05:05:45,845 [myid:] - INFO [main:ZooKeeper@438] - Initiating > client connection, > connectString=3Dip-172-31-15-68.us-west-2.compute.internal:2181 > sessionTimeout=3D30000 > watcher=3Dorg.apache.zookeeper.ZooKeeperMain$MyWatcher@3b8a9e64 > > Welcome to ZooKeeper! > > 2013-08-31 05:05:45,898 [myid:] - INFO > [main-SendThread(ip-172-31-15-68.us-west-2.compute.internal:2181):Client= Cnxn$SendThread@966] > - Opening socket connection to server > ip-172-31-15-68.us-west-2.compute.internal/172.31.15.68:2181. Will not > attempt to authenticate using SASL (unknown error) > > JLine support is enabled > > [zk: ip-172-31-15-68.us-west-2.compute.internal:2181(CONNECTING) 0] > 2013-08-31 05:06:15,920 [myid:] - INFO > [main-SendThread(ip-172-31-15-68.us-west-2.compute.internal:2181):Client= Cnxn$SendThread@1083] > - Client session timed out, have not heard from server in 30040ms for > sessionid 0x0, closing socket connection and attempting reconnect > > 2013-08-31 05:06:17,024 [myid:] - INFO > [main-SendThread(ip-172-31-15-68.us-west-2.compute.internal:2181):Client= Cnxn$SendThread@966] > - Opening socket connection to server > ip-172-31-15-68.us-west-2.compute.internal/172.31.15.68:2181. Will not > attempt to authenticate using SASL (unknown error) > > 2013-08-31 05:06:47,052 [myid:] - INFO > [main-SendThread(ip-172-31-15-68.us-west-2.compute.internal:2181):Client= Cnxn$SendThread@1083] > - Client session timed out, have not heard from server in 31028ms for > sessionid 0x0, closing socket connection and attempting reconnect > > 2013-08-31 05:06:48,154 [myid:] - INFO > [main-SendThread(ip-172-31-15-68.us-west-2.compute.internal:2181):Client= Cnxn$SendThread@966] > - Opening socket connection to server > ip-172-31-15-68.us-west-2.compute.internal/172.31.15.68:2181. Will not > attempt to authenticate using SASL (unknown error) > > It seems take forever to connect. > > > > I did setup everything according to docs, I don=92t know what I did wrong= . > > The following is my conf file, and the myid is in the dataDir folder > > > > # 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/home/yjiang/zookeeper/data/zk2 > > # the port at which the clients will connect > > clientPort=3D2181 > > server.1=3Dip-172-31-15-68.us-west-2.compute.internal:2888:3888 > > server.2=3Dlocalhost:2888:3888 > > server.3=3Dip-172-31-15-67.us-west-2.compute.internal:2888:3888 > > #server.4=3Dip-172-31-15-66.us-west-2.compute.internal:2888:3888 > > #server.5=3Dip-172-31-26-18.us-west-2.compute.internal:2888:3888 > > # > > # Be sure to read the maintenance section of the > > # administrator guide before turning on autopurge. > > # > > # > http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenanc= e > > # > > # 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 > > > > FYI I have added the port 2181, 2888 and 3888 to my firewalls in all > machines. I even disabled the firewall in all machines, it still doesn=92= t > work > > Please help me > > Thanks a lot. > > > > Jacky > > > > --f46d043be1647114a004e554c267--