Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized VM option '+UseCompressedOops' when running kafka from my ubuntu in vmware

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.

like image 409
yoganandh Avatar asked Dec 02 '22 20:12

yoganandh


1 Answers

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
like image 174
Sri Avatar answered Dec 05 '22 09:12

Sri