hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Robinson <he...@cloudera.com>
Subject Re: problem in deploying zookeeper ensemble
Date Thu, 23 Sep 2010 17:19:48 GMT
BCC'ing flume-user, moving to zookeeper-user

Have you created a file called 'myid' in /var/zookeeper[1,2,3]/ containing
that server's id? So for server 1, you'd do

echo 1 > /var/zookeeper1/myid

Henry

On 23 September 2010 00:34, sanjiv singh <sanjiv.is.on@gmail.com> wrote:

> hi all,
> i m try to test zookeeper ensemble
> i have 3 three zookeeper server in Single system..
> following  r the configurations.....
> my IP : 192.168.145.117
>
> server.1  conf/zoo.cfg
>
> tickTime=2000
> initLimit=10
> syncLimit=5
> dataDir=/var/zookeeper1
> clientPort=2184
> server.1=192.168.145.117:2888:3888
> server.2=192.168.145.117:2889:3889
> server.3=192.168.145.117:2890:3890
>
> server.2  conf/zoo.cfg
>
> tickTime=2000
> initLimit=10
> syncLimit=5
> dataDir=/var/zookeeper2
> clientPort=2185
> server.1=192.168.145.117:2888:3888
> server.2=192.168.145.117:2889:3889
> server.3=192.168.145.117:2890:3890
>
> server.1  conf/zoo.cfg
>
> tickTime=2000
> initLimit=10
> syncLimit=5
> dataDir=/var/zookeeper3
> clientPort=2186
> server.1=192.168.145.117:2888:3888
> server.2=192.168.145.117:2889:3889
> server.3=192.168.145.117:2890:3890
>
> i started all servers with zkServer.sh start
>
> and
> when  i tried to start zookeeper client through ...
> <zookeeper_home> $bin/zkCli.sh  at any server...........
>
> it gives following error............
>
>
>
> Connecting to localhost:2181
> 2010-09-23 12:53:27,486 - INFO  [main:Environment@97] - Client
> environment:zookeeper.version=3.3.1-942149, built on 05/07/2010 17:14
> GMT
> 2010-09-23 12:53:27,491 - INFO  [main:Environment@97] - Client
> environment:host.name=sanjivsingh-desktop
> 2010-09-23 12:53:27,491 - INFO  [main:Environment@97] - Client
> environment:java.version=1.6.0_20
> 2010-09-23 12:53:27,492 - INFO  [main:Environment@97] - Client
> environment:java.vendor=Sun Microsystems Inc.
> 2010-09-23 12:53:27,493 - INFO  [main:Environment@97] - Client
> environment:java.home=/usr/lib/jvm/java-6-sun-1.6.0.20/jre
> 2010-09-23 12:53:27,494 - INFO  [main:Environment@97] - Client
> environment:java.class.path=/home/sanjivsingh/sanjiv_flume/
> zookeeper-3.3.1/bin/../build/classes:/home/sanjivsingh/sanjiv_flume/
> zookeeper-3.3.1/bin/../build/lib/*.jar:/home/sanjivsingh/sanjiv_flume/
> zookeeper-3.3.1/bin/../zookeeper-3.3.1.jar:/home/sanjivsingh/
> sanjiv_flume/zookeeper-3.3.1/bin/../lib/log4j-1.2.15.jar:/home/
> sanjivsingh/sanjiv_flume/zookeeper-3.3.1/bin/../lib/jline-0.9.94.jar:/
> home/sanjivsingh/sanjiv_flume/zookeeper-3.3.1/bin/../src/java/lib/
> *.jar:/home/sanjivsingh/sanjiv_flume/zookeeper-3.3.1/bin/../conf:
> 2010-09-23 12:53:27,495 - INFO  [main:Environment@97] - Client
> environment:java.library.path=/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/
> i386/client:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386:/usr/lib/jvm/
> java-6-sun-1.6.0.20/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/
> usr/lib
> 2010-09-23 12:53:27,495 - INFO  [main:Environment@97] - Client
> environment:java.io.tmpdir=/tmp
> 2010-09-23 12:53:27,496 - INFO  [main:Environment@97] - Client
> environment:java.compiler=<NA>
> 2010-09-23 12:53:27,499 - INFO  [main:Environment@97] - Client
> environment:os.name=Linux
> 2010-09-23 12:53:27,499 - INFO  [main:Environment@97] - Client
> environment:os.arch=i386
> 2010-09-23 12:53:27,499 - INFO  [main:Environment@97] - Client
> environment:os.version=2.6.32-21-generic
> 2010-09-23 12:53:27,500 - INFO  [main:Environment@97] - Client
> environment:user.name=root
> 2010-09-23 12:53:27,500 - INFO  [main:Environment@97] - Client
> environment:user.home=/root
> 2010-09-23 12:53:27,500 - INFO  [main:Environment@97] - Client
> environment:user.dir=/home/sanjivsingh/sanjiv_flume/zookeeper-3.3.1
> 2010-09-23 12:53:27,503 - INFO  [main:ZooKeeper@373] - Initiating
> client connection, connectString=localhost:2181 sessionTimeout=30000
> watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@14d3343
> 2010-09-23 12:53:27,533 - INFO  [main-SendThread():ClientCnxn
> $SendThread@1000] - Opening socket connection to server localhost/
> 127.0.0.1:2181
> Welcome to ZooKeeper!
> 2010-09-23 12:53:27,552 - WARN  [main-SendThread(localhost:
> 2181):ClientCnxn$SendThread@1120] - Session 0x0 for server null,
> unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
>        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>        at
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:
> 574)
>        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:
> 1078)
> JLine support is enabled
> [zk: localhost:2181(CONNECTING) 0] 2010-09-23 12:53:28,246 - INFO
> [main-SendThread(localhost:2181):ClientCnxn$SendThread@1000] - Opening
> socket connection to server localhost/0:0:0:0:0:0:0:1:2181
> 2010-09-23 12:53:28,248 - WARN  [main-SendThread(localhost:
> 2181):ClientCnxn$SendThread@1120] - Session 0x0 for server null,
> unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
>        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>        at
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:
> 574)
>        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:
> 1078)
> 2010-09-23 12:53:29,866 - INFO  [main-SendThread(localhost:
> 2181):ClientCnxn$SendThread@1000] - Opening socket connection to
> server localhost/127.0.0.1:2181
> 2010-09-23 12:53:29,868 - WARN  [main-SendThread(localhost:
> 2181):ClientCnxn$SendThread@1120] - Session 0x0 for server null,
> unexpected error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
>        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>        at
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:
> 574)
>        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:
> 1078)
>
> what  im able to find here that zookeeper client tring to connect to
> master at : 2181
> but according to my configuration all server are listening at...
>
> server.1      clientPort=2184
> server.2      clientPort=2185
> server.3      clientPort=2186
> .
> .
> .
> means that it is using defaut port:2181
>
> Can anybody tell me What is exactly prolem ?
> Is client process is unable to find our configuration ?
>
>
> Thanks .
> Sanjiv Singh ( iLabs)
> Impetus Infotech (India).
> Mob :+091-9990-447-339
>
>
>
>


-- 
Henry Robinson
Software Engineer
Cloudera
415-994-6679

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message