You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by René Weinert <re...@hotmail.com> on 2011/12/01 21:33:57 UTC

Invalid config

Hi!

I tried to set up Zookeeper for the first time with the following request
and error:

ubuntu@ubuntu:~/zookeeper-3.3.3$ java -cp
zookeeper-3.3.3.jar:lib/log4j-1.2.15.jar:conf
org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
2011-12-01 20:13:42,733 - INFO  [main:QuorumPeerConfig@90] - Reading
configuration from: zoo.cfg
2011-12-01 20:13:42,736 - FATAL [main:QuorumPeerMain@83] - Invalid config,
exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error
processing zoo.cfg
        at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
ava:110)
        at
org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPee
rMain.java:99)
        at
org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:7
6)
Caused by: java.lang.IllegalArgumentException: zoo.cfg file is missing
        at
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
ava:94)
        ... 2 more
Invalid config, exiting abnormally


My config file (zookeeper/confi/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.
dataDir=/data
# the port at which the clients will connect
clientPort=2181

server.1=XXX.XXX.XXX.91:2888:3888
server.2=XXX.XXX.XXX.92:2888:3888
server.3=XXX.XXX.XXX.93:2888:3888


and I have a file called "myid" (with the content "1") in the directory
"zookeeper/data".



Can you tell me what I have to change in order for it to work?


Thanks!
René


Re: Invalid config

Posted by nileader <ni...@gmail.com>.
Did you put you zoo.cfg in the %ZOOKEEPER-HOME%/conf/ ? Or did you rename
you zoo-***.cfg to zoo.cfg?




2011/12/2 René Weinert <re...@hotmail.com>

> Hi!
>
> I tried to set up Zookeeper for the first time with the following request
> and error:
>
> ubuntu@ubuntu:~/zookeeper-3.3.3$ java -cp
> zookeeper-3.3.3.jar:lib/log4j-1.2.15.jar:conf
> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
> 2011-12-01 20:13:42,733 - INFO  [main:QuorumPeerConfig@90] - Reading
> configuration from: zoo.cfg
> 2011-12-01 20:13:42,736 - FATAL [main:QuorumPeerMain@83] - Invalid config,
> exiting abnormally
> org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error
> processing zoo.cfg
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
> ava:110)
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPee
> rMain.java:99)
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:7
> 6)
> Caused by: java.lang.IllegalArgumentException: zoo.cfg file is missing
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
> ava:94)
>        ... 2 more
> Invalid config, exiting abnormally
>
>
> My config file (zookeeper/confi/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.
> dataDir=/data
> # the port at which the clients will connect
> clientPort=2181
>
> server.1=XXX.XXX.XXX.91:2888:3888
> server.2=XXX.XXX.XXX.92:2888:3888
> server.3=XXX.XXX.XXX.93:2888:3888
>
>
> and I have a file called "myid" (with the content "1") in the directory
> "zookeeper/data".
>
>
>
> Can you tell me what I have to change in order for it to work?
>
>
> Thanks!
> René
>
>

Re: Invalid config

Posted by Patrick Hunt <ph...@apache.org>.
It's this:
Caused by: java.lang.IllegalArgumentException: zoo.cfg file is missing
you need to pass the correct location of zoo.cfg when running the server.

Patrick
On Thu, Dec 1, 2011 at 12:33 PM, René Weinert <re...@hotmail.com> wrote:
> Hi!
>
> I tried to set up Zookeeper for the first time with the following request
> and error:
>
> ubuntu@ubuntu:~/zookeeper-3.3.3$ java -cp
> zookeeper-3.3.3.jar:lib/log4j-1.2.15.jar:conf
> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
> 2011-12-01 20:13:42,733 - INFO  [main:QuorumPeerConfig@90] - Reading
> configuration from: zoo.cfg
> 2011-12-01 20:13:42,736 - FATAL [main:QuorumPeerMain@83] - Invalid config,
> exiting abnormally
> org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error
> processing zoo.cfg
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
> ava:110)
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPee
> rMain.java:99)
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:7
> 6)
> Caused by: java.lang.IllegalArgumentException: zoo.cfg file is missing
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
> ava:94)
>        ... 2 more
> Invalid config, exiting abnormally
>
>
> My config file (zookeeper/confi/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.
> dataDir=/data
> # the port at which the clients will connect
> clientPort=2181
>
> server.1=XXX.XXX.XXX.91:2888:3888
> server.2=XXX.XXX.XXX.92:2888:3888
> server.3=XXX.XXX.XXX.93:2888:3888
>
>
> and I have a file called "myid" (with the content "1") in the directory
> "zookeeper/data".
>
>
>
> Can you tell me what I have to change in order for it to work?
>
>
> Thanks!
> René
>

Re: Invalid config

Posted by Patrick Hunt <ph...@gmail.com>.
It's this:

Caused by: java.lang.IllegalArgumentException: zoo.cfg file is missing

you need to pass the correct location of zoo.cfg when running the server.

Patrick

On Thu, Dec 1, 2011 at 12:33 PM, René Weinert <re...@hotmail.com> wrote:
> Hi!
>
> I tried to set up Zookeeper for the first time with the following request
> and error:
>
> ubuntu@ubuntu:~/zookeeper-3.3.3$ java -cp
> zookeeper-3.3.3.jar:lib/log4j-1.2.15.jar:conf
> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
> 2011-12-01 20:13:42,733 - INFO  [main:QuorumPeerConfig@90] - Reading
> configuration from: zoo.cfg
> 2011-12-01 20:13:42,736 - FATAL [main:QuorumPeerMain@83] - Invalid config,
> exiting abnormally
> org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error
> processing zoo.cfg
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
> ava:110)
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPee
> rMain.java:99)
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:7
> 6)
> Caused by: java.lang.IllegalArgumentException: zoo.cfg file is missing
>        at
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.j
> ava:94)
>        ... 2 more
> Invalid config, exiting abnormally
>
>
> My config file (zookeeper/confi/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.
> dataDir=/data
> # the port at which the clients will connect
> clientPort=2181
>
> server.1=XXX.XXX.XXX.91:2888:3888
> server.2=XXX.XXX.XXX.92:2888:3888
> server.3=XXX.XXX.XXX.93:2888:3888
>
>
> and I have a file called "myid" (with the content "1") in the directory
> "zookeeper/data".
>
>
>
> Can you tell me what I have to change in order for it to work?
>
>
> Thanks!
> René
>

AW: Invalid config

Posted by René Weinert <re...@hotmail.com>.
Actually, it was in exactly this directory. But after Patricks hint, I changed to command to

java -cp zookeeper-3.3.3.jar:lib/log4j-1.2.15.jar:conf org.apache.zookeeper.server.quorum.QuorumPeerMain conf/zoo.cfg

and it worked.


Thanks to you all!

-----Ursprüngliche Nachricht-----
Von: nileader [mailto:nileader@gmail.com] 
Gesendet: Thursday, December 01, 2011 8:10 PM
An: user@zookeeper.apache.org
Betreff: Re: Invalid config

Did you put you zoo.cfg in the %ZOOKEEPER-HOME%/conf/ ? Or did you rename you zoo-***.cfg to zoo.cfg?




2011/12/2 René Weinert <re...@hotmail.com>

> Hi!
>
> I tried to set up Zookeeper for the first time with the following 
> request and error:
>
> ubuntu@ubuntu:~/zookeeper-3.3.3$ java -cp 
> zookeeper-3.3.3.jar:lib/log4j-1.2.15.jar:conf
> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
> 2011-12-01 20:13:42,733 - INFO  [main:QuorumPeerConfig@90] - Reading 
> configuration from: zoo.cfg
> 2011-12-01 20:13:42,736 - FATAL [main:QuorumPeerMain@83] - Invalid 
> config, exiting abnormally
> org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: 
> Error processing zoo.cfg
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerCo
> nfig.j
> ava:110)
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(Quo
> rumPee
> rMain.java:99)
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.
> java:7
> 6)
> Caused by: java.lang.IllegalArgumentException: zoo.cfg file is missing
>        at
>
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerCo
> nfig.j
> ava:94)
>        ... 2 more
> Invalid config, exiting abnormally
>
>
> My config file (zookeeper/confi/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.
> dataDir=/data
> # the port at which the clients will connect
> clientPort=2181
>
> server.1=XXX.XXX.XXX.91:2888:3888
> server.2=XXX.XXX.XXX.92:2888:3888
> server.3=XXX.XXX.XXX.93:2888:3888
>
>
> and I have a file called "myid" (with the content "1") in the 
> directory "zookeeper/data".
>
>
>
> Can you tell me what I have to change in order for it to work?
>
>
> Thanks!
> René
>
>