Now I used GC like this:

-server -Xms1536m -Xmx1536m -XX:NewSize=128m -XX:MaxNewSize=128m
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC
But it still happened.  It seems kafka server reconnect with zk, but the
old node was still there. So kafka server stopped.
Can kafka server retry to connect with zk?
2013-03-27 22:15:03,529] INFO Opening socket connection to server localhost/ (org.apache.zookeeper.ClientCnxn)
[2013-03-27 22:15:03,529] INFO Socket connection established to localhost/, initiating session (org.apache.zookeeper.ClientCnxn)
[2013-03-27 22:15:05,855] INFO Session establishment complete on server
localhost/, sessionid = 0x13da6d94abf00aa, negotiated timeout
= 6000 (org.apache.zookeeper.ClientCnxn)
[2013-03-27 22:15:05,942] INFO zookeeper state changed (SyncConnected)
[2013-03-27 22:15:14,912] INFO conflict in /brokers/ids/0 data: stored data: null
[2013-03-27 22:15:14,942] ERROR Error handling event ZkEvent[New session
event sent to kafka.server.KafkaZooKeeper$SessionExpireListener@18f389bc]
java.lang.RuntimeException: A broker is already registered on the path
/brokers/ids/0. This probably indicates that you either have configured a
brokerid that is already in use, or else you have shutdown this broker and
restarted it faster than the zookeeper timeout so it appears to be
    at org.I0Itec.zkclient.ZkClient$
[2013-03-27 22:15:33,736] INFO Closing socket connection to /

2013/3/27 Neha Narkhede <[EMAIL PROTECTED]>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB