Kafka中錯誤:Unrecognized VM option ‘UseCompressedOops’ Error: Clould not create the Java Vritual Machine. Error: A fatal exception has occurres . Program will exit.


  

  錯誤的描述:

  在kafka安裝目錄下,執行 $ bin/zookeeper-server-start.sh config/zookeeper.properties & 

 

Unrecognized VM option ‘UseCompressedOops’

Error: Clould not create the Java Vritual Machine.

Error: A fatal exception has occurres . Program will exit.

 

  解決方法:

找到bin/kafka-run-class.sh 文件,使用vim打開,我的這個版本是在115行

113 # JVM performance options

114 if [ -z "$KAFKA_JVM_PERFORMANCE_OPTS" ]; then

115   KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseCompressedOops -XX:+UseParNewGC     -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRe    mark -XX:+DisableExplicitGC -Djava.awt.headless=true"

116 fi

  去掉-XX:+UseCompressedOops這個設置

 

 

 

   去掉,之后的結果:

111 # JVM performance options

112 if [ -z "$KAFKA_JVM_PERFORMANCE_OPTS" ]; then

113   KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBefo    reRemark -XX:+DisableExplicitGC -Djava.awt.headless=true"

114 fi

 

  然后,保存,退出。再次,執行,

在kafka安裝目錄下,執行 $ bin/zookeeper-server-start.sh config/zookeeper.properties & 

 

   即,此問題,得到了解決!

 

  參考鏈接: kafka入門介紹及環境搭建-Kafka-about雲開發


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM