升级zookeeper。我遇到过新版kafka,zookeeper升到3.4.9后就没问题了。但是老版本就不确定,你可以尝试一下。
刚发现zookeeper 在不停打这个日志
Accepted socket connection from /10.65.10.228:64971
2017-07-24 19:29:09,419 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close of session 0x0 due to java.io.EOFException
2017-07-24 19:29:09,419 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /10.65.10.228:64971 (no session established for client)
之前考虑是不是跟client链接断开 加了try/catch 但是好像并不是这个原因;
尝试换group id, 消费一段时间,就停止了,日志一直在print:Got ping response for sessionid: 0x15d4b69db43018e after 0ms