Home > Back-end >  Questions about the zookeeper start
Questions about the zookeeper start

Time:10-11

Start is not an error:
 [root @ redis bin] # zkServer. Sh start 
ZooKeeper JMX enabled by default
Using the config:/usr/local/zookeeper - 3.4.8/bin/../conf/zoo. CFG
Starting zookeeper... STARTED
[root @ redis bin] #


Check the status:
 [root @ redis bin] # zkServer. Sh status 
ZooKeeper JMX enabled by default
Using the config:/usr/local/zookeeper - 3.4.8/bin/../conf/zoo. CFG
The Error contacting service. It is probably not running.
[root @ redis bin] #



1, the port is not occupied2, the JDK environment variable right
 [root @ redis bin] # echo $JAVA_HOME 
The/usr/Java/jdk1.6.0 _45
[root @ redis bin] # echo $CLASSPATH
. :/usr/Java/jdk1.6.0 _45/lib/dt. The jar:/usr/Java/jdk1.6.0 _45/lib/tools. The jar
[root @ redis bin] # Java - version
Java version "1.6.0 _45
"Java (TM) SE Runtime Environment (build 1.6.0 _45 - b06)
The Java HotSpot (TM) 64 - Bit Server VM (20.45 b01 build, mixed mode)
[root @ redis bin] #



 
[root @ redis bin] # whereis Java
Java:/usr/bin/Java
[root @ redis bin] # which Java
The/usr/Java/jdk1.6.0 _45/bin/Java
[root @ redis bin] #


View the log is the class didn't recruit, and search on the net, also didn't recruit solution
 [root @ redis bin] # vim zookeeper. Out 

Exception in the thread "main" Java. Lang. NoClassDefFoundError: org/apache/zookeeper/server/quorum QuorumPeerMain
Under Caused by: Java. Lang. ClassNotFoundException: org. Apache. The zookeeper. Server. Quorum. QuorumPeerMain
The at java.net.URLClassLoader$1.run URLClassLoader. Java: (202)
The at Java. Security. The AccessController. DoPrivileged (Native Method)
The at java.net.URLClassLoader.findClass URLClassLoader. Java: (190)
The at Java. Lang. This. LoadClass (306). This Java:
At sun. Misc. The Launcher $AppClassLoader. LoadClass (301). The Launcher Java:
The at Java. Lang. This. LoadClass (247). This Java:
Could not find the main class: org. Apache. The zookeeper. Server. The quorum. QuorumPeerMain. The Program will exit.
~
~

CodePudding user response:

You just start the zookeeper?

CodePudding user response:

reference 1st floor fengspg response:
you just start the zookeeper?


http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_zkMulitServerSetup

Cluster environment, seemed to add compiler environment,

If your configuration file is set up, you can start a ZooKeeper server:
$Java - cp zookeeper. Jar: lib/log4j - 1.2.15. Jar: the conf \ org apache. Zookeeper. Server. Quorum. QuorumPeerMain zoo. The CFG
QuorumPeerMain starts a ZooKeeper server, JMX management beans are also registered which allows management through a JMX management console. The ZooKeeper JMX document contains details on managing ZooKeeper with JMX.
See the script bin/zkServer. Sh, which is included in the release, for an example of starting server instances.

CodePudding user response:

Should be no configuration myid, under the zookeeper data file path of configuration creates a myid file, write the number of Settings
  • Related