When java.security.auth.login.config is present, but there is no "Client" section, ZookeeperSaslClient creation fails and raises LoginExcpetion, result in warning log:
When this happens after initial startup, ClientCnxn enqueues an AuthFailed event which will trigger following sequence:
- zkclient reinitialization is triggered
- the controller resigns.
- Before the controller's ZK session expires, the controller successfully connect to ZK and maintains the current session
- In KafkaController.elect(), the controller sets activeControllerId to itself and short-circuits the rest of the elect. Since the controller resigned earlier and also skips the call to onControllerFailover(), the controller is not actually functioning as the active controller (e.g. the necessary ZK watchers haven't been registered).