kafka.common.KafkaException: Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.

1、刚才未启动zookeeper集群的时候,直接启动kafka脚本程序,kafka报错了,但是进程号启动起来来,再次启动出现如下所示的问题,这里先将进程号杀死,再启动脚本程序。

 [hadoop@slaver1 script_hadoop]$ kafka-start.sh
start kafkaServer...
[-- ::,] INFO Verifying properties (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property broker.id is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.cleaner.enable is overridden to false (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.dirs is overridden to /tmp/kafka-logs (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.retention.check.interval.ms is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.retention.hours is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property log.segment.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property num.io.threads is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property num.network.threads is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property num.partitions is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property port is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property socket.receive.buffer.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property socket.request.max.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property socket.send.buffer.bytes is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property zookeeper.connect is overridden to slaver1:,slaver2:,slaver3: (kafka.utils.VerifiableProperties)
[-- ::,] INFO Property zookeeper.connection.timeout.ms is overridden to (kafka.utils.VerifiableProperties)
[-- ::,] INFO [Kafka Server ], starting (kafka.server.KafkaServer)
[-- ::,] INFO [Kafka Server ], Connecting to zookeeper on slaver1:,slaver2:,slaver3: (kafka.server.KafkaServer)
[-- ::,] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[-- ::,] INFO Client environment:zookeeper.version=3.3.-, built on // : GMT (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:host.name=slaver1 (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.version=1.7.0_79 (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.home=/home/hadoop/soft/jdk1..0_79/jre (org.apache.zookeeper.ZooKeeper)
[-- ::,] INFO Client environment:java.class.path=:/home/hadoop/soft/kafka_2.9.2-0.8./bin/../core/build/dependant-libs-2.8./*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../perf/build/libs//kafka-perf_2.8.0*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../clients/build/libs//kafka-clients*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../examples/build/libs//kafka-examples*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/jopt-simple-3.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/kafka_2.9.2-0.8.1.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/log4j-1.2.15.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-annotation-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-core-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/scala-library-2.9.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-api-1.7.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-nop-1.7.6.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/snappy-java-1.0.5.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zkclient-0.3.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zookeeper-3.3.4.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../core/build/libs/kafka_2.8.0*.jar (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,140] INFO Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,140] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,140] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,140] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,140] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,141] INFO Client environment:os.version=2.6.32-358.el6.x86_64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,141] INFO Client environment:user.name=hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,141] INFO Client environment:user.home=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,141] INFO Client environment:user.dir=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,143] INFO Initiating client connection, connectString=slaver1:2181,slaver2:2181,slaver3:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@61a2d734 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,223] INFO Opening socket connection to server slaver3/192.168.19.133:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:27,247] INFO Socket connection established to slaver3/192.168.19.133:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:27,271] INFO Session establishment complete on server slaver3/192.168.19.133:2181, sessionid = 0x363857e11950000, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:27,275] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
[2018-05-22 09:37:27,425] FATAL Fatal error during KafkaServerStable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
kafka.common.KafkaException: Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:95)
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:92)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.mutable.WrappedArray.map(WrappedArray.scala:33)
at kafka.log.LogManager.lockLogDirs(LogManager.scala:92)
at kafka.log.LogManager.<init>(LogManager.scala:55)
at kafka.server.KafkaServer.createLogManager(KafkaServer.scala:275)
at kafka.server.KafkaServer.startup(KafkaServer.scala:72)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34)
at kafka.Kafka$.main(Kafka.scala:46)
at kafka.Kafka.main(Kafka.scala)
[2018-05-22 09:37:27,437] INFO [Kafka Server 1], shutting down (kafka.server.KafkaServer)
[2018-05-22 09:37:27,452] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2018-05-22 09:37:27,460] INFO EventThread shut down (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:27,461] INFO Session: 0x363857e11950000 closed (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:27,463] INFO [Kafka Server 1], shut down completed (kafka.server.KafkaServer)
[2018-05-22 09:37:27,558] INFO [Kafka Server 1], shutting down (kafka.server.KafkaServer)
[2018-05-22 09:37:30,444] INFO Verifying properties (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,525] INFO Property broker.id is overridden to 2 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,526] INFO Property log.cleaner.enable is overridden to false (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,526] INFO Property log.dirs is overridden to /tmp/kafka-logs (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,527] INFO Property log.retention.check.interval.ms is overridden to 60000 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,527] INFO Property log.retention.hours is overridden to 168 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,527] INFO Property log.segment.bytes is overridden to 536870912 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,528] INFO Property num.io.threads is overridden to 8 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,529] INFO Property num.network.threads is overridden to 2 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,530] INFO Property num.partitions is overridden to 2 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,532] INFO Property port is overridden to 9092 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,533] INFO Property socket.receive.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,534] INFO Property socket.request.max.bytes is overridden to 104857600 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,534] INFO Property socket.send.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,535] INFO Property zookeeper.connect is overridden to slaver1:2181,slaver2:2181,slaver3:2181 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,537] INFO Property zookeeper.connection.timeout.ms is overridden to 1000000 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:30,567] INFO [Kafka Server 2], starting (kafka.server.KafkaServer)
[2018-05-22 09:37:30,569] INFO [Kafka Server 2], Connecting to zookeeper on slaver1:2181,slaver2:2181,slaver3:2181 (kafka.server.KafkaServer)
[2018-05-22 09:37:30,622] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2018-05-22 09:37:30,674] INFO Client environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 GMT (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,674] INFO Client environment:host.name=slaver2 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,674] INFO Client environment:java.version=1.7.0_79 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,674] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,674] INFO Client environment:java.home=/home/hadoop/soft/jdk1.7.0_79/jre (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,675] INFO Client environment:java.class.path=:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../core/build/dependant-libs-2.8.0/*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../perf/build/libs//kafka-perf_2.8.0*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../clients/build/libs//kafka-clients*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../examples/build/libs//kafka-examples*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/jopt-simple-3.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/kafka_2.9.2-0.8.1.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/log4j-1.2.15.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-annotation-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-core-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/scala-library-2.9.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-api-1.7.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-nop-1.7.6.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/snappy-java-1.0.5.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zkclient-0.3.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zookeeper-3.3.4.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../core/build/libs/kafka_2.8.0*.jar (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,675] INFO Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,675] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,675] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,676] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,678] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,678] INFO Client environment:os.version=2.6.32-358.el6.x86_64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,679] INFO Client environment:user.name=hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,679] INFO Client environment:user.home=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,679] INFO Client environment:user.dir=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,681] INFO Initiating client connection, connectString=slaver1:2181,slaver2:2181,slaver3:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@6ae56499 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:30,723] INFO Opening socket connection to server slaver1/192.168.19.131:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:30,732] INFO Socket connection established to slaver1/192.168.19.131:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:30,752] INFO Session establishment complete on server slaver1/192.168.19.131:2181, sessionid = 0x163857dfeaa0001, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:30,758] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
[2018-05-22 09:37:31,139] FATAL Fatal error during KafkaServerStable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
kafka.common.KafkaException: Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:95)
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:92)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.mutable.WrappedArray.map(WrappedArray.scala:33)
at kafka.log.LogManager.lockLogDirs(LogManager.scala:92)
at kafka.log.LogManager.<init>(LogManager.scala:55)
at kafka.server.KafkaServer.createLogManager(KafkaServer.scala:275)
at kafka.server.KafkaServer.startup(KafkaServer.scala:72)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34)
at kafka.Kafka$.main(Kafka.scala:46)
at kafka.Kafka.main(Kafka.scala)
[2018-05-22 09:37:31,153] INFO [Kafka Server 2], shutting down (kafka.server.KafkaServer)
[2018-05-22 09:37:31,173] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2018-05-22 09:37:31,184] INFO Session: 0x163857dfeaa0001 closed (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:31,185] INFO [Kafka Server 2], shut down completed (kafka.server.KafkaServer)
[2018-05-22 09:37:31,186] INFO EventThread shut down (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:31,266] INFO [Kafka Server 2], shutting down (kafka.server.KafkaServer)
[2018-05-22 09:37:33,769] INFO Verifying properties (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,891] INFO Property broker.id is overridden to 3 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,892] INFO Property log.cleaner.enable is overridden to false (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,892] INFO Property log.dirs is overridden to /tmp/kafka-logs (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,892] INFO Property log.retention.check.interval.ms is overridden to 60000 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,893] INFO Property log.retention.hours is overridden to 168 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,893] INFO Property log.segment.bytes is overridden to 536870912 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,893] INFO Property num.io.threads is overridden to 8 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,895] INFO Property num.network.threads is overridden to 2 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,896] INFO Property num.partitions is overridden to 2 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,897] INFO Property port is overridden to 9092 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,897] INFO Property socket.receive.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,898] INFO Property socket.request.max.bytes is overridden to 104857600 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,899] INFO Property socket.send.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,900] INFO Property zookeeper.connect is overridden to slaver1:2181,slaver2:2181,slaver3:2181 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,901] INFO Property zookeeper.connection.timeout.ms is overridden to 1000000 (kafka.utils.VerifiableProperties)
[2018-05-22 09:37:33,928] INFO [Kafka Server 3], starting (kafka.server.KafkaServer)
[2018-05-22 09:37:33,930] INFO [Kafka Server 3], Connecting to zookeeper on slaver1:2181,slaver2:2181,slaver3:2181 (kafka.server.KafkaServer)
[2018-05-22 09:37:33,989] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2018-05-22 09:37:34,010] INFO Client environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 GMT (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,010] INFO Client environment:host.name=slaver3 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,010] INFO Client environment:java.version=1.7.0_79 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,010] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,011] INFO Client environment:java.home=/home/hadoop/soft/jdk1.7.0_79/jre (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,011] INFO Client environment:java.class.path=:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../core/build/dependant-libs-2.8.0/*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../perf/build/libs//kafka-perf_2.8.0*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../clients/build/libs//kafka-clients*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../examples/build/libs//kafka-examples*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/jopt-simple-3.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/kafka_2.9.2-0.8.1.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/log4j-1.2.15.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-annotation-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/metrics-core-2.2.0.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/scala-library-2.9.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-api-1.7.2.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/slf4j-nop-1.7.6.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/snappy-java-1.0.5.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zkclient-0.3.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../libs/zookeeper-3.3.4.jar:/home/hadoop/soft/kafka_2.9.2-0.8.1/bin/../core/build/libs/kafka_2.8.0*.jar (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,011] INFO Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,011] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,011] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,012] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,012] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,013] INFO Client environment:os.version=2.6.32-358.el6.x86_64 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,014] INFO Client environment:user.name=hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,014] INFO Client environment:user.home=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,015] INFO Client environment:user.dir=/home/hadoop (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,017] INFO Initiating client connection, connectString=slaver1:2181,slaver2:2181,slaver3:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@6ae56499 (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,081] INFO Opening socket connection to server slaver1/192.168.19.131:2181 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:34,091] INFO Socket connection established to slaver1/192.168.19.131:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:34,106] INFO Session establishment complete on server slaver1/192.168.19.131:2181, sessionid = 0x163857dfeaa0002, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:34,111] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
[2018-05-22 09:37:34,268] FATAL Fatal error during KafkaServerStable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
kafka.common.KafkaException: Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:95)
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:92)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.mutable.WrappedArray.map(WrappedArray.scala:33)
at kafka.log.LogManager.lockLogDirs(LogManager.scala:92)
at kafka.log.LogManager.<init>(LogManager.scala:55)
at kafka.server.KafkaServer.createLogManager(KafkaServer.scala:275)
at kafka.server.KafkaServer.startup(KafkaServer.scala:72)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34)
at kafka.Kafka$.main(Kafka.scala:46)
at kafka.Kafka.main(Kafka.scala)
[2018-05-22 09:37:34,279] INFO [Kafka Server 3], shutting down (kafka.server.KafkaServer)
[2018-05-22 09:37:34,304] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2018-05-22 09:37:34,311] INFO Session: 0x163857dfeaa0002 closed (org.apache.zookeeper.ZooKeeper)
[2018-05-22 09:37:34,311] INFO [Kafka Server 3], shut down completed (kafka.server.KafkaServer)
[2018-05-22 09:37:34,312] INFO EventThread shut down (org.apache.zookeeper.ClientCnxn)
[2018-05-22 09:37:34,559] INFO [Kafka Server 3], shutting down (kafka.server.KafkaServer)
[hadoop@slaver1 script_hadoop]$ jps
2898 Jps
2802 QuorumPeerMain
2725 Kafka
[hadoop@slaver1 script_hadoop]$
上一篇:Mockups


下一篇:Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.