Kafka启动出现Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Pr
kafka启动时,出现报错![root@Spark1 bin]# cat nohup.outUnrecognized VM option ‘UseCompressedOops’Error: Could not create the Java Virtual Machine.Error: A fatal exception has occurred. Program will ex...
kafka启动时,出现报错!
[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.
原因:
开始以为是内存大小的问题, 后来发现不是,是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
启动成功!
更多推荐
所有评论(0)