Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-13461

KafkaController stops functioning as active controller after ZooKeeperClient auth failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0, 3.0.1
    • zkclient
    • None

    Description

      When java.security.auth.login.config is present, but there is no "Client" section,  ZookeeperSaslClient creation fails and raises LoginExcpetion, result in warning log:

      WARN SASL configuration failed: javax.security.auth.login.LoginException: No JAAS configuration section named 'Client' was found in specified JAAS configuration file: '***'. Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it.

      When this happens after initial startup, ClientCnxn enqueues an AuthFailed event which will trigger following sequence:

      1. zkclient reinitialization is triggered
      2. the controller resigns.
      3. Before the controller's ZK session expires, the controller successfully connect to ZK and maintains the current session
      4. 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).

       

      Attachments

        Issue Links

          Activity

            People

              rsivaram Rajini Sivaram
              vincent81jiang Vincent Jiang
              Jun Rao Jun Rao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: