我对Kafka还比较陌生,希望了解以下异常是表示Kafka执行环境不健康,还是可以忽略:
java.util.NoSuchElementException: key not found: \tmp\kafka-logs
这是那个目录的内容。注意“-0”目录中的每一个都对应于kafka服务器上的五个主题之一。e、 g.calls-0指“calls”主题:
C:\apps\kafka_2.9.2-0.8.1\bin>dir \tmp\kafka-logs
Volume in drive C is Windows7_OS
Volume Serial Number is AC58-16CE
Directory of C:\tmp\kafka-logs
05/26/2014 02:11 PM <DIR> .
05/26/2014 02:11 PM <DIR> ..
05/24/2014 11:03 PM 0 .lock
05/24/2014 11:15 PM <DIR> calls-0
05/24/2014 11:31 PM <DIR> calls_no_phone-0
05/24/2014 11:31 PM <DIR> calls_online-0
05/24/2014 11:31 PM <DIR> dropped_calls-0
05/26/2014 02:11 PM 94 recovery-point-offset-checkpoint
05/24/2014 11:03 PM 0 replication-offset-checkpoint
05/24/2014 11:31 PM <DIR> vip_ips_alerts-0
系统在Windows7上使用JDK7运行KafakVersion0.8.1 for Scala2.9.2
这里是完整的启动控制台输出(是的,它很长。。但我选择保留它,因为我不确定对你们中更有经验的人来说,重要的线索可能在哪里):
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
log4j:ERROR Failed to rename [logs/server.log] to [logs/server.log.2014-05-25-05].
[2014-05-26 14:05:22,767] INFO Verifying properties (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,971] INFO Property broker.id is overridden to 0 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,972] INFO Property log.cleaner.enable is overridden to false (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,972] INFO Property log.dirs is overridden to /tmp/kafka-logs (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,973] INFO Property log.retention.check.interval.ms is overridden to 60000 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,973] INFO Property log.retention.hours is overridden to 168 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,974] INFO Property log.segment.bytes is overridden to 536870912 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,974] INFO Property num.io.threads is overridden to 8 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,975] INFO Property num.network.threads is overridden to 2 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,975] INFO Property num.partitions is overridden to 2 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,976] INFO Property port is overridden to 9092 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,976] INFO Property socket.receive.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,977] INFO Property socket.request.max.bytes is overridden to 104857600 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,977] INFO Property socket.send.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,978] INFO Property zookeeper.connect is overridden to localhost:2181 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:22,978] INFO Property zookeeper.connection.timeout.ms is overridden to 1000000 (kafka.utils.VerifiableProperties)
[2014-05-26 14:05:23,024] INFO [Kafka Server 0], starting (kafka.server.KafkaServer)
[2014-05-26 14:05:23,045] INFO [Kafka Server 0], Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)
[2014-05-26 14:05:23,073] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2014-05-26 14:05:23,092] INFO Client environment:zookeeper.version=3.3.3-1203054, built on 11/17/2011 05:47 GMT (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,092] INFO Client environment:host.name=S80035683-SC01.china.huawei.com (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,093] INFO Client environment:java.version=1.7.0_51 (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,095] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,096] INFO Client environment:java.home=c:\java7\jre (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,097] INFO Client environment:java.class.path=C:\apps\kafka_2.9.2-0.8.1\libs\jopt-simple-3.2.jar;C:\apps\kafka_2.9.2-0.8.1\libs\ka
fka_2.9.2-0.8.1.jar;C:\apps\kafka_2.9.2-0.8.1\libs\log4j-1.2.15.jar;C:\apps\kafka_2.9.2-0.8.1\libs\metrics-annotation-2.2.0.jar;C:\apps\kafka_2.9.2-0.
8.1\libs\metrics-core-2.2.0.jar;C:\apps\kafka_2.9.2-0.8.1\libs\scala-library-2.9.2.jar;C:\apps\kafka_2.9.2-0.8.1\libs\slf4j-api-1.7.2.jar;C:\apps\kafk
a_2.9.2-0.8.1\libs\snappy-java-1.0.5.jar;C:\apps\kafka_2.9.2-0.8.1\libs\zkclient-0.3.jar;C:\apps\kafka_2.9.2-0.8.1\libs\zookeeper-3.3.4.jar;;C:\Users\
S80035683\.ivy2\cache/org.xerial.snappy/snappy-java/bundles/snappy-java-1.0.5.jar;C:\Users\S80035683\.ivy2\cache/org.scala-lang/scala-library/jars/sca
la-library-2.8.0.jar;C:\Users\S80035683\.ivy2\cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.8.0.jar;C:\Users\S80035683\.ivy2\cache/log4j/l
og4j/jars/log4j-1.2.15.jar;C:\Users\S80035683\.ivy2\cache/org.slf4j/slf4j-api/jars/slf4j-api-1.6.4.jar;C:\Users\S80035683\.ivy2\cache/org.apache.zooke
eper/zookeeper/jars/zookeeper-3.3.4.jar;C:\Users\S80035683\.ivy2\cache/net.sf.jopt-simple/jopt-simple/jars/jopt-simple-3.2.jar (org.apache.zookeeper.Z
ooKeeper)
[2014-05-26 14:05:23,099] INFO Client environment:java.library.path=c:\java7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\shared\ConE
mu;c:\python27;c:\java7\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\bin;c:\apps\sbt\bin;C:\apps\apache-maven-3.2.1\bin;c:\cygwin\bin;c:\cygwin\l
ib\awk;c:\java\bin;.;c:\shared;c:\scripts;c:\shared;C:\Program Files\eSpace-ecs;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Sys
tem32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Lenovo;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\SWTOOLS\ReadyApps;C:\Program Fi
les\Riverbed\Steelhead Mobile\;C:\scala\bin;C:\apps\sbt\\bin;;C:\apps\OpenSSH\bin;C:\apps\sbt13\\bin;C:\apps\nodejs\;C:\Program Files\IDM Computer Sol
utions\UltraEdit\;C:\Users\S80035683\AppData\Roaming\npm;. (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,100] INFO Client environment:java.io.tmpdir=C:\Users\S80035~1\AppData\Local\Temp\ (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,100] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,100] INFO Client environment:os.name=Windows 7 (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,100] INFO Client environment:os.arch=x86 (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,100] INFO Client environment:os.version=6.1 (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,101] INFO Client environment:user.name=s80035683 (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,101] INFO Client environment:user.home=C:\Users\S80035683 (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,101] INFO Client environment:user.dir=C:\apps\kafka_2.9.2-0.8.1\bin (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,102] INFO Initiating client connection, connectString=localhost:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@5ea
8af (org.apache.zookeeper.ZooKeeper)
[2014-05-26 14:05:23,125] INFO Opening socket connection to server localhost/127.0.0.1:2181 (org.apache.zookeeper.ClientCnxn)
[2014-05-26 14:05:23,127] INFO Socket connection established to localhost/127.0.0.1:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2014-05-26 14:05:23,172] INFO Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x1463a5a1b370000, negotiated timeout =
6000 (org.apache.zookeeper.ClientCnxn)
[2014-05-26 14:05:23,174] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
[2014-05-26 14:05:23,620] INFO Found clean shutdown file. Skipping recovery for all logs in data directory 'C:\tmp\kafka-logs' (kafka.log.LogManager)
[2014-05-26 14:05:23,637] INFO Loading log 'calls-0' (kafka.log.LogManager)
[2014-05-26 14:05:23,778] WARN Error when freeing index buffer (kafka.log.OffsetIndex)
java.lang.NullPointerException
at kafka.log.OffsetIndex.kafka$log$OffsetIndex$$forceUnmap(OffsetIndex.scala:301)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:283)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:276)
at kafka.utils.Utils$.inLock(Utils.scala:538)
at kafka.log.OffsetIndex.resize(OffsetIndex.scala:276)
at kafka.log.Log.loadSegments(Log.scala:154)
at kafka.log.Log.<init>(Log.scala:64)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:118)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:113)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:113)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:105)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at kafka.log.LogManager.loadLogs(LogManager.scala:105)
at kafka.log.LogManager.<init>(LogManager.scala:57)
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)
[2014-05-26 14:05:23,807] INFO Completed load of log calls-0 with log end offset 0 (kafka.log.Log)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[2014-05-26 14:05:23,828] INFO Loading log 'calls_no_phone-0' (kafka.log.LogManager)
[2014-05-26 14:05:23,831] WARN Error when freeing index buffer (kafka.log.OffsetIndex)
java.lang.NullPointerException
at kafka.log.OffsetIndex.kafka$log$OffsetIndex$$forceUnmap(OffsetIndex.scala:301)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:283)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:276)
at kafka.utils.Utils$.inLock(Utils.scala:538)
at kafka.log.OffsetIndex.resize(OffsetIndex.scala:276)
at kafka.log.Log.loadSegments(Log.scala:154)
at kafka.log.Log.<init>(Log.scala:64)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:118)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:113)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:113)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:105)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at kafka.log.LogManager.loadLogs(LogManager.scala:105)
at kafka.log.LogManager.<init>(LogManager.scala:57)
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)
[2014-05-26 14:05:23,836] INFO Completed load of log calls_no_phone-0 with log end offset 0 (kafka.log.Log)
[2014-05-26 14:05:23,838] INFO Loading log 'calls_online-0' (kafka.log.LogManager)
[2014-05-26 14:05:23,845] WARN Error when freeing index buffer (kafka.log.OffsetIndex)
java.lang.NullPointerException
at kafka.log.OffsetIndex.kafka$log$OffsetIndex$$forceUnmap(OffsetIndex.scala:301)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:283)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:276)
at kafka.utils.Utils$.inLock(Utils.scala:538)
at kafka.log.OffsetIndex.resize(OffsetIndex.scala:276)
at kafka.log.Log.loadSegments(Log.scala:154)
at kafka.log.Log.<init>(Log.scala:64)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:118)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:113)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:113)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:105)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at kafka.log.LogManager.loadLogs(LogManager.scala:105)
at kafka.log.LogManager.<init>(LogManager.scala:57)
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)
[2014-05-26 14:05:23,862] INFO Completed load of log calls_online-0 with log end offset 0 (kafka.log.Log)
[2014-05-26 14:05:23,863] INFO Loading log 'dropped_calls-0' (kafka.log.LogManager)
[2014-05-26 14:05:23,866] WARN Error when freeing index buffer (kafka.log.OffsetIndex)
java.lang.NullPointerException
at kafka.log.OffsetIndex.kafka$log$OffsetIndex$$forceUnmap(OffsetIndex.scala:301)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:283)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:276)
at kafka.utils.Utils$.inLock(Utils.scala:538)
at kafka.log.OffsetIndex.resize(OffsetIndex.scala:276)
at kafka.log.Log.loadSegments(Log.scala:154)
at kafka.log.Log.<init>(Log.scala:64)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:118)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:113)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:113)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:105)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at kafka.log.LogManager.loadLogs(LogManager.scala:105)
at kafka.log.LogManager.<init>(LogManager.scala:57)
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)
[2014-05-26 14:05:23,869] INFO Completed load of log dropped_calls-0 with log end offset 0 (kafka.log.Log)
[2014-05-26 14:05:23,871] INFO Loading log 'vip_ips_alerts-0' (kafka.log.LogManager)
[2014-05-26 14:05:23,879] WARN Error when freeing index buffer (kafka.log.OffsetIndex)
java.lang.NullPointerException
at kafka.log.OffsetIndex.kafka$log$OffsetIndex$$forceUnmap(OffsetIndex.scala:301)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:283)
at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:276)
at kafka.utils.Utils$.inLock(Utils.scala:538)
at kafka.log.OffsetIndex.resize(OffsetIndex.scala:276)
at kafka.log.Log.loadSegments(Log.scala:154)
at kafka.log.Log.<init>(Log.scala:64)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:118)
at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$4.apply(LogManager.scala:113)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:113)
at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:105)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at kafka.log.LogManager.loadLogs(LogManager.scala:105)
at kafka.log.LogManager.<init>(LogManager.scala:57)
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)
[2014-05-26 14:05:23,885] INFO Completed load of log vip_ips_alerts-0 with log end offset 0 (kafka.log.Log)
[2014-05-26 14:05:23,888] INFO Starting log cleanup with a period of 60000 ms. (kafka.log.LogManager)
[2014-05-26 14:05:23,895] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
[2014-05-26 14:05:23,959] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor)
[2014-05-26 14:05:23,961] INFO [Socket Server on Broker 0], Started (kafka.network.SocketServer)
[2014-05-26 14:05:24,155] INFO Will not load MX4J, mx4j-tools.jar is not in the classpath (kafka.utils.Mx4jLoader$)
[2014-05-26 14:05:24,219] INFO 0 successfully elected as leader (kafka.server.ZookeeperLeaderElector)
[2014-05-26 14:05:24,532] INFO New leader is 0 (kafka.server.ZookeeperLeaderElector$LeaderChangeListener)
[2014-05-26 14:05:24,539] INFO Registered broker 0 at path /brokers/ids/0 with address S80035683-SC01.china.huawei.com:9092. (kafka.utils.ZkUtils$)
[2014-05-26 14:05:24,551] INFO [Kafka Server 0], started (kafka.server.KafkaServer)
[2014-05-26 14:05:24,755] INFO [ReplicaFetcherManager on broker 0] Removed fetcher for partitions [vip_ips_alerts,0],[calls,0],[dropped_calls,0],[call
s_online,0],[calls_no_phone,0] (kafka.server.ReplicaFetcherManager)
[2014-05-26 14:05:24,771] ERROR [KafkaApi-0] error when handling request Name:LeaderAndIsrRequest;Version:0;Controller:0;ControllerEpoch:2;Correlation
Id:4;ClientId:id_0-host_null-port_9092;Leaders:id:0,host:S80035683-SC01.china.huawei.com,port:9092;PartitionState:(vip_ips_alerts,0) -> (LeaderAndIsrI
nfo:(Leader:0,ISR:0,LeaderEpoch:0,ControllerEpoch:1),ReplicationFactor:1),AllReplicas:0),(calls,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:0,
ControllerEpoch:1),ReplicationFactor:1),AllReplicas:0),(dropped_calls,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:0,ControllerEpoch:1),Replica
tionFactor:1),AllReplicas:0),(calls_online,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:0,ControllerEpoch:1),ReplicationFactor:1),AllReplicas:0
),(calls_no_phone,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:0,ControllerEpoch:1),ReplicationFactor:1),AllReplicas:0) (kafka.server.KafkaApis
)
java.util.NoSuchElementException: key not found: \tmp\kafka-logs
at scala.collection.MapLike$class.default(MapLike.scala:225)
at scala.collection.immutable.Map$Map1.default(Map.scala:107)
at scala.collection.MapLike$class.apply(MapLike.scala:135)
at scala.collection.immutable.Map$Map1.apply(Map.scala:107)
at kafka.cluster.Partition.getOrCreateReplica(Partition.scala:91)
at kafka.cluster.Partition$$anonfun$makeLeader$2.apply(Partition.scala:175)
at kafka.cluster.Partition$$anonfun$makeLeader$2.apply(Partition.scala:175)
at scala.collection.immutable.Set$Set1.foreach(Set.scala:86)
at kafka.cluster.Partition.makeLeader(Partition.scala:175)
at kafka.server.ReplicaManager$$anonfun$makeLeaders$5.apply(ReplicaManager.scala:305)
at kafka.server.ReplicaManager$$anonfun$makeLeaders$5.apply(ReplicaManager.scala:304)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:157)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:190)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:45)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:95)
at kafka.server.ReplicaManager.makeLeaders(ReplicaManager.scala:304)
at kafka.server.ReplicaManager.becomeLeaderOrFollower(ReplicaManager.scala:258)
at kafka.server.KafkaApis.handleLeaderAndIsrRequest(KafkaApis.scala:100)
at kafka.server.KafkaApis.handle(KafkaApis.scala:72)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:42)
at java.lang.Thread.run(Thread.java:744)
[2014-05-26 14:05:24,779] INFO [ReplicaFetcherManager on broker 0] Removed fetcher for partitions [vip_ips_alerts,0],[calls,0],[dropped_calls,0],[call
s_online,0],[calls_no_phone,0] (kafka.server.ReplicaFetcherManager)
[2014-05-26 14:05:24,787] ERROR [KafkaApi-0] error when handling request Name:LeaderAndIsrRequest;Version:0;Controller:0;ControllerEpoch:2;Correlation
Id:5;ClientId:id_0-host_null-port_9092;Leaders:id:0,host:S80035683-SC01.china.huawei.com,port:9092;PartitionState:(vip_ips_alerts,0) -> (LeaderAndIsrI
nfo:(Leader:0,ISR:0,LeaderEpoch:1,ControllerEpoch:2),ReplicationFactor:1),AllReplicas:0),(calls,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:1,
ControllerEpoch:2),ReplicationFactor:1),AllReplicas:0),(dropped_calls,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:1,ControllerEpoch:2),Replica
tionFactor:1),AllReplicas:0),(calls_online,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:1,ControllerEpoch:2),ReplicationFactor:1),AllReplicas:0
),(calls_no_phone,0) -> (LeaderAndIsrInfo:(Leader:0,ISR:0,LeaderEpoch:1,ControllerEpoch:2),ReplicationFactor:1),AllReplicas:0) (kafka.server.KafkaApis
)
java.util.NoSuchElementException: key not found: \tmp\kafka-logs
at scala.collection.MapLike$class.default(MapLike.scala:225)
at scala.collection.immutable.Map$Map1.default(Map.scala:107)
at scala.collection.MapLike$class.apply(MapLike.scala:135)
at scala.collection.immutable.Map$Map1.apply(Map.scala:107)
at kafka.cluster.Partition.getOrCreateReplica(Partition.scala:91)
at kafka.cluster.Partition$$anonfun$makeLeader$2.apply(Partition.scala:175)
at kafka.cluster.Partition$$anonfun$makeLeader$2.apply(Partition.scala:175)
at scala.collection.immutable.Set$Set1.foreach(Set.scala:86)
at kafka.cluster.Partition.makeLeader(Partition.scala:175)
at kafka.server.ReplicaManager$$anonfun$makeLeaders$5.apply(ReplicaManager.scala:305)
at kafka.server.ReplicaManager$$anonfun$makeLeaders$5.apply(ReplicaManager.scala:304)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:157)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:190)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:45)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:95)
at kafka.server.ReplicaManager.makeLeaders(ReplicaManager.scala:304)
at kafka.server.ReplicaManager.becomeLeaderOrFollower(ReplicaManager.scala:258)
at kafka.server.KafkaApis.handleLeaderAndIsrRequest(KafkaApis.scala:100)
at kafka.server.KafkaApis.handle(KafkaApis.scala:72)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:42)
at java.lang.Thread.run(Thread.java:744)
1条答案
按热度按时间eblbsuwk1#
您需要将日志目录更改为windows路径,例如c:\tmp\kafka logs
kafka0.8.1的bat文件充满了错误。下面是一个非常有用的博客,我跟随它在windows上运行。他给出了一个带有固定bat文件的git回购的链接。