zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Costa <psdc1...@gmail.com>
Subject 2 instances of zookeeper in the same machine.
Date Wed, 27 Jun 2012 09:26:09 GMT
Hi,

I'm trying to configure 2 instances of zookeeper in the same machine. My
zoo.cfg is

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=localhost:2888:3888
server.2=localhost:2889:3889

But I got this error:

2012-06-27 10:06:36,322 [myid:] - INFO  [main:QuorumPeerConfig@101] -
Reading configuration from: /home/xeon/zookeeper/bin/../conf/zoo.cfg
2012-06-27 10:06:36,328 [myid:] - WARN  [main:QuorumPeerConfig@287] - No
server failure will be tolerated. You need at least 3 servers.
2012-06-27 10:06:36,328 [myid:] - INFO  [main:QuorumPeerConfig@334] -
Defaulting to majority quorums
2012-06-27 10:06:36,329 [myid:] - ERROR [main:QuorumPeerMain@85] - Invalid
config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error
processing /home/xeon/zookeeper/bin/../conf/zoo.cfg
        at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:121)
        at
org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
        at
org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.lang.IllegalArgumentException: /tmp/zookeeper/myid file is
missing
        at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:344)
        at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:117)
        ... 2 more
Invalid config, exiting abnormally

How do I configure two instances of zookeeper in the same machine?
-- 
Best regards,

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