zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Xie <xie3208...@gmail.com>
Subject zookeeper cannot be started after cfg changed
Date Wed, 18 Sep 2019 03:12:28 GMT
Hello,

I am using zookeeper 3.5.5

I installed it /opt

I modified the zoo.cfg to be:
# The number of milliseconds of each tick
tickTime=2000
initLimit=5
syncLimit=2
dataDir=/var/lib/zookeeperdata/1
clientPort=2181

server.1=pocnnr1n1:2888:3888
server.2=pocdnr1n1:2889:3889
server.3=pocdnr2n1:2890:3890

*I was able to start it with:*
[rxie@pocdnr1n1 apache-zookeeper-3.5.5]$ sudo bin/zkServer.sh start
conf/zoo.cfg

And then I realized I need to change the port from 2181 to 2182 for this is
the second zk node, so I made the change.

And then I am not able to start zookeeper, even after I reboot the server.
output is below:
ZooKeeper JMX enabled by default
Using config: conf/zoo.cfg
Starting zookeeper ... FAILED TO START

Log shows:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/zookeeper/
 server/quorum/QuorumPeerMain
Caused by: java.lang.ClassNotFoundException:
org.apache.zookeeper.server.quorum.
 QuorumPeerMain
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class:
org.apache.zookeeper.server.quorum.QuorumPeerMain
     .  Program will exit.


Can anyone enlighten me why it was ok for the first time but can't be
started after the port is updated to a non-default one? how can I fix it?

Thank you very much.




*Sincerely yours,*


*Raymond*

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