When installing zookeeper under Linux, the following error occurs:
[ hadoop@hadoop-master bin]$ ./ zkServer.sh start
JMX disabled by user request
Using config: /opt/zookeeper-3.3.3/bin/../conf/ zoo.cfg
Starting zookeeper …
STARTED
[ hadoop@hadoop-master bin]$ 2011-07-05 10:33:57,587 – INFO [ main:QuorumPeerConfig@90 ] – Reading configuration from: /opt/zookeeper-3.3.3/bin/../conf/ zoo.cfg
2011-07-05 10:33:57,596 – WARN [ main:QuorumPeerMain@105 ] – Either no config or no quorum defined in config, running in standalone mode
Exception in thread “main” java.lang.NoSuchMethodError : method java.lang.management . ManagementFactory.getPlatformMBeanServer with signature () Ljavax.management.MBeanServer ; was not found.
at org.apache.zookeeper . jmx.ManagedUtil.registerLog4jMBeans ( ManagedUtil.java:48 )
at org.apache.zookeeper . server.ZooKeeperServerMain.initializeAndRun ( ZooKeeperServerMain.java:73 )
at org.apache.zookeeper . server.ZooKeeperServerMain.main ( ZooKeeperServerMain.java:51 )
at org.apache.zookeeper . server.quorum.QuorumPeerMain .initializeAndRun( QuorumPeerMain.java:108 )
at org.apache.zookeeper . server.quorum.QuorumPeerMain .main( QuorumPeerMain.java:76 )
Found, not found java.lang.management The next way. If you are using the standard JDK, such an error should not occur. So check it out zkServer.sh Script. It is found that the script to start the Java program is as follows:
Bash code
java “- Dzookeeper.log.dir= ${ZOO_ LOG_ DIR}” “- Dzookeeper.root.logger= ${ZOO_ LOG4J_ PROP}” \
-cp “$CLASSPATH” $JVMFLAGS $ZOOMAIN “$ZOOCFG” &
Executing Java command directly under Linux, the output is as follows:
Bash code
[ hadoop@hadoop-master bin]$ java
Usage: gij [OPTION] … CLASS [ARGS] …
to invoke CLASS.main , or
gij -jar [OPTION] … JARFILE [ARGS] …
to execute a jar file
Try `gij –help’ for more information.
Obviously, zkServer.sh Incorrect java used. Use the Java of Gij. To solve this problem, simply change the script to:
Bash code
$JAVA_ HOME/bin/java “- Dzookeeper.log.dir= ${ZOO_ LOG_ DIR}” “- Dzookeeper.root.logger= ${ZOO_ LOG4J_ PROP}” \
-cp “$CLASSPATH” $JVMFLAGS $ZOOMAIN “$ZOOCFG” &
After this modification, it can run normally.
It is mainly to replace the system’s own Java path, so that he can identify his own installed Java (it’s better to delete the system’s own JDK before installing software)
Read More:
- The first installation of zookeeper on Linux failed to start
- Zookeeper connection timeout problem, and refused to connect to solve the problem
- Zookeeper Failed to Start Error: start failed [How to Solve]
- Zookeeper start error [How to Solve]
- Installing zookeeper under Linux system
- How to solve the problem of error 15: file not found when Linux starts
- To solve the problem, start eclipse and return exit code = 13
- Error in starting zookeeper in Windows: zookeeper audit is disabled
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux
- Error: (serious: a child container failed during start) (server component failed to start so Tomcat is unable)
- How to solve the problem of “unable to open / dev / vmmon: broken pipeline” when running VMware virtual machine?
- How to solve the problem of “unable to open source file XXXXX. H” in VS development?
- Solve the problem that Gabor can’t start itself after the server is restarted
- How to solve the problem of “unable to open include file:” graphics. H “: no such file or directory”
- Perfectly solve the problem of NPM start error: cannot find module ‘XX’
- Starting zookeeper to report an error already running as process
- Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using’”‘ in pip installation
- Solve the problem of unable to locate package python3.6 when upgrading from python3.5 to python3.6 in ubantu16.04
- Solve the problem that the Raspberry Pi cannot start (dependency failed for Local File Systems)
- zookeeper Failed to Startup: Error: JAVA_HOME is not set and java could not be found in PATH