You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "ReiValera (via GitHub)" <gi...@apache.org> on 2026/09/28 21:30:52 UTC

[I] Helix ZkClient times out after successful ZooKeeper SASL DIGEST-MD5 authentication [helix]

ReiValera opened a new issue, #3184:
URL: https://github.com/apache/helix/issues/3184

   ### Describe the bug
   When a ZooKeeper server requires SASL DIGEST-MD5 authentication, an Apache Helix controller and participant establish ZooKeeper sessions and receive SaslAuthenticated, but Helix subsequently reports that its ZooKeeper client is not connected and times out.
   
   I reproduced the controller failure with unmodified Helix 1.4.3 and 2.0.1, and the participant failure with Helix 1.4.3. The same DIGEST-MD5 credentials work for a ZooKeeper client and for bootstrapping the Helix cluster.
   
   ### To Reproduce
   1. Start ZooKeeper with `org.apache.zookeeper.server.auth.SASLAuthenticationProvider` and `sessionRequireClientSASLAuth=true`.
   2. Configure the Helix JVM with a JAAS `Client` entry using `org.apache.zookeeper.server.auth.DigestLoginModule` and set `-Djava.security.auth.login.config=<JAAS file>` and `-Dzookeeper.sasl.client=true`.
   3. Bootstrap a Helix cluster using the same ZooKeeper client configuration
   4. Start `org.apache.helix.controller.HelixControllerMain` with that cluster, or connect a participant through `HelixManagerFactory.getZKHelixManager(..., InstanceType.PARTICIPANT, ...)`.
   
   The controller's ZooKeeper events reach `SyncConnected` and then `SaslAuthenticated`, followed by:
   
   ```text
   org.apache.helix.zookeeper.zkclient.exception.ZkTimeoutException:
   Waiting to be connected to ZK server has timed out.
   ```
   
   The Helix 1.4.3 participant shows the same state transition, then:
   
   ```text
   zkClient is not connected, wait for 10000ms.
   zkClient is not connected after waiting 10000ms.
   org.apache.helix.HelixException: HelixManager is not connected within retry timeout
   ```
   
   ### Expected behavior
   Helix should treat a successful SASL DIGEST-MD5 authentication as a connected session and allow the controller and participant to start.
   
   ### Additional context
   In Helix 2.0.1, `ZkClient.waitUntilConnected` expects `SaslAuthenticated` only when `isKerberosAuthEnabled()` finds a JAAS `Krb5LoginModule`. A `DigestLoginModule` client instead waits for `SyncConnected`. After successful DIGEST-MD5 authentication, the current state becomes `SaslAuthenticated`, and the exact-state wait can time out.
   
   As a local proof of concept, extending that JAAS module check to include `DigestLoginModule` allowed the controller to authenticate and become leader. This was only a diagnostic class override, not a proposed production patch. A fix should include a regression test for DIGEST-MD5 and preserve Kerberos behavior.
   
   This appears related to #3101 (Kerberos connection timeout). The Kerberos fix does not cover DIGEST-MD5.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org