Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I cannot start MapReduce2 server and Kafka server on the ambari

Highlighted

I cannot start MapReduce2 server and Kafka server on the ambari

New Contributor

I can start MapReduce2 server and Kafka server successfully on the ambari, but few minutes later, they will automatic stop again,here is the wrong message on the ambari web.

3114-qohxc.png

I also took a look at /var/log/kafka/server.log, it show that:

[2016-03-31 22:11:56,768] FATAL Fatal error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
java.io.FileNotFoundException: /kafka-logs/.lock (Permission denied)
   at java.io.RandomAccessFile.open0(Native Method)
   at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
   at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
   at kafka.utils.FileLock.<init>(FileLock.scala:29)
   at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:96)
   at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:95)
   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
   at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
   at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
   at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
   at scala.collection.AbstractTraversable.map(Traversable.scala:105)
   at kafka.log.LogManager.lockLogDirs(LogManager.scala:95)
   at kafka.log.LogManager.<init>(LogManager.scala:57)
   at kafka.server.KafkaServer.createLogManager(KafkaServer.scala:589)
   at kafka.server.KafkaServer.startup(KafkaServer.scala:171)
   at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37)
   at kafka.Kafka$.main(Kafka.scala:67)
   at kafka.Kafka.main(Kafka.scala)
[2016-03-31 22:11:56,769] INFO shutting down (kafka.server.KafkaServer)

What can i do to solve this problem?

1 REPLY 1

Re: I cannot start MapReduce2 server and Kafka server on the ambari

delete /kafka-logs/.lock file

restart kafka.

after retarting kafka.

check permission of .lock file. if there permission is other than kafka hadoop then change it to

chown -R kafka:hadoop .lock file

Don't have an account?
Coming from Hortonworks? Activate your account here