Reputation: 277
I am working with ubuntu using VMware I have Installed hadoop single node cluster in it. Then I have installed zookeeper and had run the zookeeper. then when I run my "Apache kafka" it throws an error.
Unrecognized VM option '+UseCompressedOops'
Could not create the Java virtual machine
single@ubuntu:~/yoga/zookeeper-3.4.5/bin$ ./zkServer.sh start
JMX enabled by default
Using config: /home/single/yoga/zookeeper-3.4.5/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
single@ubuntu:~/yoga/kafka_2.8.0-0.8.0$ bin/kafka-server-start.sh config/server.properties
Unrecognized VM option '+UseCompressedOops'
Could not create the Java virtual machine.
Upvotes: 4
Views: 11324
Reputation: 4853
Since your VM doesn't support '+UseCompressedOops' option. To fix it, remove that option from the kafka's configuration which'll help you to start the both (zookeeper & kafka) servers.
1) Go to the Kafka installation directory :
cd kafka_2.8.0-0.8
2) Edit the Kafka's classpath setter script :
vi bin/kafka-run-class.sh
3) Search for "KAFKA_JVM_PERFORMANCE_OPTS" token & remove '-XX:+UseCompressedOops' from that line.
i.e., before removing :
KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true"
with after removing :
KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true"
4) Start your both zookeeper & kafka server instance
./bin/zookeeper-server-start.sh config/zookeeper.properties
./bin/kafka-server-start.sh config/server.properties
Upvotes: 13
Reputation: 8161
This actually depends on the VM
mode you are running with .. there are 2 types
1) Server side
2) Client side
+UseCompressedOops
is recognized by the server VM and probably that's the reason why you are getting this error.. there could be multiple ways to check under which mode the VM
is currently running, but the easiest one I could find is to simply run java -version
and it should print some thing like this
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
there are few nice discussion regarding these two flavors of VM. You can take a look at @VonC 's answer here regarding the basic differnece between these two.
more discussions here
What does the UseCompressedOops JVM flag do and when should I use it?
http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136373.html
http://www.oracle.com/technetwork/java/whitepaper-135217.html
Upvotes: 4
Reputation: 2981
Are you using 32 bit or 64 bit machine? I have faced similar error and i resolved it by doing following steps:
1) download kafka ( in my case kafka-0.7.2-incubating-src)
2) extract it
3) cd to kafka home(where you extract the tgz)
/home/kuntal/Kuntal/BIG_DATA/kafka-0.7.2-incubating-src
4) run
./sbt update ./sbt package
5) now cd to kafaka home bin
/home/kuntal/Kuntal/BIG_DATA/kafka-0.7.2-incubating-src/bin
6) type
kafka-server-start.sh /home/kuntal/Kuntal/BIG_DATA/kafka-0.7.2-incubating-src/config/server.properties
you will see Kafka server started in terminal.Hope this help someone !! :)
Upvotes: 0