Kafka启动出现Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Pr
kafka啟動時,出現(xiàn)報錯!
[root@Spark1 bin]# cat nohup.out
Unrecognized VM option ‘UseCompressedOops’
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
原因:
開始以為是內(nèi)存大小的問題, 后來發(fā)現(xiàn)不是,是JDK的問題, 我用的32位centos,jdk1.6_24, 換成JDK1.7依然報錯。
查看 bin/kafka-run-class.sh
找到
“`
if [ -z “$KAFKA_JVM_PERFORMANCE_OPTS” ]; then
KAFKA_JVM_PERFORMANCE_OPTS=”-server -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true”
fi
去掉-XX:+UseCompressedOops
nohup kafka-server-start.sh ../config/server.properties &
jps
2342 QuorumPeerMain
2790 Kafka
2841 Jps
啟動成功!
總結(jié)
以上是生活随笔為你收集整理的Kafka启动出现Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Pr的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 禁止吸烟的标志 禁止吸烟的标志介绍
- 下一篇: 山竹的食用方法有哪些 山竹可以怎么吃