One thing missing from the list is that you need to have myid files on each server that correspond to the servers id (specified in the conf file).

You'd have a config on each system that looks something like:

"You attribute the server id to each machine by creating a file named myid, one for each server, which resides in that server's data directory, as specified by the configuration file parameter dataDir. The myid file consists of a single line containing only the text of that machine's id. So myid of server 1 would contain the text "1" and nothing else. The id must be unique within the ensemble and should have a value between 1 and 255."

My ZK ensemble configuration generator may be a help to you: (if any thing as an example of what the configuration/structure should generally look like, also an easy way to test locally before trying to deploy to remote systems)


Henry Robinson wrote:
Nearly! 1+2 are correct, but you also need to start ZooKeeper on all three
instances with bin/ start.


On Wed, Dec 9, 2009 at 11:00 AM, Something Something <> wrote:

Now that I have your question... :)

Now I would like to start a Zookeeper Quorum on 3 EC Instances.  Read the
doc regarding... "Running Replicated ZooKeeper".  It says "all servers in
the quorum should have the same configuration file"..  Does this mean... I

1)  Download & Install ZooKeeper on all 3 instances (at the same location.)
2)  Save the same zoo.cfg in /conf for all 3 instances.
3)  On one instance (Master?), run...

bin/ start

Would that start ZooKeeper on all 3 instances?  Thanks for the help.

On Wed, Dec 9, 2009 at 10:24 AM, Something Something <> wrote:

Switched to 3.2.1.  Much better.  Got a command prompt.  Thank you both.

On Wed, Dec 9, 2009 at 10:09 AM, Henry Robinson <

The 3.2.1 command line is a lot nicer (has an actual prompt, tab
auto-completion, shows your connection status etc) - if you can upgrade
3.2.1 which is a good deal more modern, I would recommend it. If I
correctly, there was no prompt in 3.1.1...


On Wed, Dec 9, 2009 at 9:36 AM, Something Something <> wrote:

Without -server made some progress, but don't see a command prompt.
Shouldn't I see one?

This is what I see:
2009-12-09 17:27:56,709 - INFO  [main:zookee...@341] - Initiating
connection, host= sessionTimeout=5000
2009-12-09 17:27:56,710 - INFO  [main:clientc...@91] -
zookeeper.disableAutoWatchReset is false
2009-12-09 17:27:56,792 - INFO
- Attempting connection to server /
2009-12-09 17:27:56,802 - INFO
- Priming connection to java.nio.channels.SocketChannel[connected
local=/ remote=/]
2009-12-09 17:27:56,806 - INFO
- Server connection successful
WatchedEvent: Server state change. New state: SyncConnected

Should I just use 3.2.1 version?

On Wed, Dec 9, 2009 at 9:20 AM, Mahadev Konar <>

 Can you try this?


The -server command was added later as far as I remember.


On 12/9/09 9:05 AM, "Something Something" <

I am trying to start ZooKeeper on an EC2 instance.  Here's what I
1)  Downloaded & Unpacked ZooKeeper 3.1.1 on EC2 instance.
2)  cp /conf/zoo_sample.cfg /conf/zoo.cfg
3)  Changed the dataDir path to point to my EBS volume.
4)  In one command window, ran /bin/ start
(The last message I see is... "Snapshotting: 0)

5)  Opened another command window, and ran jps
(This shows a new process called, QuorumPeerMain.  That's the only

6)  As per documentation, tried

bin/ -server

(This gives me IOException: USAGE)

7) So I ran:

bin/ -server ls

Got UnknownHostException: -server

8)  So I tried various ways of specifying IP address in EC2, such

None of them worked.  Keep getting UnknownHostException.

What am I doing wrong.  Please help.  Thanks.

Reply via email to