更新ACL规则时出现ZK连接问题。
./bin/kafka-acls.sh --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=xxx.xxx.xx3:2181,xxx.xxx.xx2:2181,xxx.xxx.xx1:2181 --add --allow-principal User:xxxxxxxx --operation Read --topic xxxxxxxxxx
[2020-05-12 12:29:01,340] DEBUG An exception was thrown while closing send thread for session 0x300528cdbc70015 : Unable to read additional data from server sessionid 0x300528cdbc70015, likely server has closed socket (org.apache.zookeeper.ClientCnxn)
Error while executing ACL command: Timed out waiting for connection while in state: CONNECTING
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:258)
at ....
该错误是间歇性发生的,无法确定根本原因。
添加于2020/6/4 在本地主机上运行似乎永远也不会超时。
./bin/kafka-acls.sh --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:xxxxxxx --operation Read --topic xxxxxxx
但是,运行合奏是导致超时的原因。
./bin/kafka-acls.sh --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=hostxxxx001:2181,hostxxxx002:2181 --add --allow-principal User:xxxxxxx --operation Read --topic xxxxxxx