[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: