Problem-1 : Error while producing message from console_producer.
WARN Error while fetching metadata [{TopicMetadata for topic some.topic ->
No partition metadata for topic some.topic due to kafka.common.LeaderNotAvailableException}] for topic [some.topic]: class kafka.common.LeaderNotAvailableException (kafka.producer. BrokerPartitionInfo)
Sol: checkpoints 1. Zookeeper logs/data cleared. 2. kafka logs/data cleared. 3. create topic again. 4.ensure use of same broker as in producer.properties.(in my case i was using 127.0.0.1 instead of node name for console producer. hurrrrr...).
Problem-2 : Could not connect to partition leader localhost:9092. Error message: empty.head.Offset request with correlation id 1 from client on partition [<TOPIC_NAME>,0] failed due to Topic <TOPIC_NAME> either doesn't exist or is in the process of being deleted (kafka.server.KafkaApis).
Sol: Stop kafka > delete topic's folder in kafka's data dir. > remove zookeeper entry "rmr /brokers/topics/<TOPIC_NAME>" > restart kafka.
Problem-3 : Unrecognized VM option 'UseCompressedOops'
Sol: removed the option from file kafka-run-class.sh in KAFKA_HOME/bin directory...