求助!!!
使用kafka和zookeeper搭建集群,zookeeper已经搭建OK,kafka配置参数也已经完成,所有的过程都是远程连接服务器部署安装。部署完成后zookeeper和kafka都能够启动运行正常 ,但是当远程连接一断开,再次远程登录kafka就会自动断开,启动kafka使用的是
bin/kafka-server-start.sh -daemon config/server.properties
kafka版本:kafka_2.10-0.10.2.0
在配置kafka的server.properties的参数是按照如下:
broker.id=1
port=9092
host.name=192.168.3.1
log.dirs=/home/user/home/www/kafka_2.10-0.10.1.0/logs(此处由实际的路径设置)
zookeeper.connect=192.168.3.1:2181,192.168.3.2:2181,192.168.3.3:2181
报错信息来自kafkaServer.out
[2017-04-18 05:38:06,023] INFO [Kafka Server 1], shut down completed (kafka.server.KafkaServer)
[2017-04-18 05:38:06,023] FATAL Fatal error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
java.io.FileNotFoundException: /home/ubuntu/home/www/kafka_2.10-0.10.2.0/logs/__consumer_offsets-49/00000000000000000000.index (No such file or directory)
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.log.AbstractIndex$$anonfun$resize$1.apply(AbstractIndex.scala:102)
at kafka.log.AbstractIndex$$anonfun$resize$1.apply(AbstractIndex.scala:101)
at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:213)
at kafka.log.AbstractIndex.resize(AbstractIndex.scala:101)
at kafka.log.AbstractIndex$$anonfun$trimToValidSize$1.apply$mcV$sp(AbstractIndex.scala:163)
at kafka.log.AbstractIndex$$anonfun$trimToValidSize$1.apply(AbstractIndex.scala:163)
at kafka.log.AbstractIndex$$anonfun$trimToValidSize$1.apply(AbstractIndex.scala:163)
at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:213)
at kafka.log.AbstractIndex.trimToValidSize(AbstractIndex.scala:162)
at kafka.log.LogSegment.recover(LogSegment.scala:250)
at kafka.log.Log$$anonfun$loadSegments$4.apply(Log.scala:231)
at kafka.log.Log$$anonfun$loadSegments$4.apply(Log.scala:188)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
at kafka.log.Log.loadSegments(Log.scala:188)
at kafka.log.Log.<init>(Log.scala:116)
at kafka.log.LogManager$$anonfun$loadLogs$2$$anonfun$3$$anonfun$apply$10$$anonfun$apply$1.apply$mcV$sp(LogManager.scala:157)
at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:57)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[2017-04-18 05:38:06,024] INFO [Kafka Server 1], shutting down (kafka.server.KafkaServer)
非常感谢!!!
使用screen或nohup方式启动kafka
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。