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
启动成功!

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐