I think a poorly implemented Producer in our dev environment may have
triggered a bug in Kafka.
We are running 0.71.
2012-07-11 12:20:09,034 - [main:Logging$class@58] - Starting Kafka
2012-07-11 12:20:09,046 - [main:Logging$class@58] - Loading log 'test-0'
2012-07-11 12:20:09,062 - [main:Logging$class@58] - Loading the last
segment /var/lib/kafka/test-0/00000000000000000000.kafka in mutable mode,
2012-07-11 12:20:09,082 - [main:Logging$class@58] - Loading log 'marketing'
2012-07-11 12:20:09,088 - [main:Logging$class@96] - Fatal error during
KafkaServerStable startup. Prepare to shutdown
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
1) We blew away /var/lib/kafka as our two brokers did not have the same
contents but were both displaying this error on different parts. I saved
this data from one system for future review if useful. Kafka still did not
2) I logged into ZooKeeper and the directory structure
/brokers/topics/<topic>/<broker_id> had string values matching what should
have been topics where <broker_id> goes. Manually clearing out
/brokers/topics and restarting Kafka on both brokers did resolve the issue.
Obviously there would have been data loss had this been a production
environment. Is this a known issue where we simply are not using Kafka
properly or have we accidentally made a mal-formed producer which did
something the broker did not expect?
We are not sure what the Producers we are working on may have done to cause
this. We have two developers working on independent producers to integrate
into our applications.