Kafka startup fails with zookeeper timeout (remote server), yet the machine can connect to zookeeper directly -
when start kafka up, fails while complaining cannot connect zookeeper. running zookeeper standalone cluster/ensemble. confused because there no firewall between servers (as evidenced zookeeper-shell.sh test).
from /var/log/kafka/server.log
2016-02-24 16:07:12,101 info kafka.server.kafkaserver: [kafka server 1], connecting zookeeper on 10.7.20.100:2181,10.7.20.101:2181,10.7.20.102:2181 2016-02-24 16:07:20,291 fatal kafka.server.kafkaserverstartable: fatal error during kafkaserverstable startup. prepare shutdown org.i0itec.zkclient.exception.zktimeoutexception: unable connect zookeeper server within timeout: 6000 @ org.i0itec.zkclient.zkclient.connect(zkclient.java:880) @ org.i0itec.zkclient.zkclient.<init>(zkclient.java:98) @ org.i0itec.zkclient.zkclient.<init>(zkclient.java:84) @ kafka.server.kafkaserver.initzk(kafkaserver.scala:113) @ kafka.server.kafkaserver.startup(kafkaserver.scala:69) @ kafka.server.kafkaserverstartable.startup(kafkaserverstartable.scala:34) @ kafka.kafka$.main(kafka.scala:46) @ kafka.kafka.main(kafka.scala) 2016-02-24 16:07:20,294 info kafka.server.kafkaserver: [kafka server 1], shutting down 2016-02-24 16:07:20,312 info kafka.server.kafkaserver: [kafka server 1], shut down completed 2016-02-24 16:07:20,317 info kafka.server.kafkaserver: [kafka server 1], shutting down
however /opt/kafka install directory able connect zookeeper using esemble connection string - doubt network or firewall.
[me@dckafka01 kafka]$ cd /opt/kafka [me@dckafka01 kafka]$ bin/zookeeper-shell.sh 10.7.20.100:2181,10.7.20.101:2181,10.7.20.102:2181 connecting 10.7.20.100:2181,10.7.20.101:2181,10.7.20.102:2181 welcome zookeeper! jline support disabled watcher::watchedevent state:syncconnected type:none path:null /blah null czxid = 0x400000009 ctime = tue feb 16 09:00:28 est 2016 mzxid = 0x400000009 mtime = tue feb 16 09:00:28 est 2016 pzxid = 0x40000017e cversion = 2 dataversion = 0 aclversion = 0 ephemeralowner = 0x0 datalength = 0 numchildren = 2 ls /blah [applications, registry]
which expected. have angle me investigate?
well - changing timeout helped. need chase network delays down
cat config/server.properties
# coding: utf-8 # file created chef template. not hand edit file log.dirs=/var/kafka port=9092 num.partitions=4 default.replication.factor=3 log.flush.interval.messages=1 log.retention.minutes=43200 log.retention.check.interval.ms=3600000 num.replica.fetchers=4 replica.fetch.wait.max.ms=5000 replica.lag.max.messages=10000 auto.leader.rebalance.enable=true num.network.threads=8 advertised.host.name=10.7.20.71 zookeeper.connection.timeout.ms=16000 broker.id=1 zookeeper.connect=10.7.20.100:2181,10.7.20.101:2181,10.7.20.102:2181
Comments
Post a Comment