I think you need to make sure that the Zookeeper sessions have enough time to time out, so if you restart a broker too fast, it can't start properly because of that. If this is the situation you're in, then the message you would get in the Kafka broker's log should tell you pretty explicitly / clearly. AFAIK, the solution is simply to wait a little bit before starting again...
If you have another problem than the one I'm describing, then you should post what you see in the logs... -- Felix On Mon, Oct 22, 2012 at 12:06 PM, howard chen <howac...@gmail.com> wrote: > I am using supervisor to manage Kafka, with the config: > > [program:kafka] > command=/opt/kafka/bin/kafka-server-start.sh > /opt/kafka/config/server.properties > directory=/opt/kafka > user=kafka > autostart=true > autorestart=true > startretries=10 > stdout_logfile=/opt/kafka/logs/kafka.log > > I was able to start Kafka, but not able to stop Kafka completely, as > when I start Kafka after the stop, it said the port is being used. > > So definitely the previous shutdown was not complete, anyone got an > idea what is the issue? > > Thanks. >