Helix ZkClient times out after successful ZooKeeper SASL DIGEST-MD5 authentication

Đang mở
#3,184 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@adityaanikam đang làm issue này rồi.

Từ ngày 29/9/2026.

  • #3185 của @adityaanikam — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java

Hướng nghiên cứu

Start at ZkClient.waitUntilConnected and the isKerberosAuthEnabled check described in the issue. Reproduce the controller or participant timeout with the provided DIGEST-MD5 JAAS configuration, then add the requested regression test covering successful authentication while preserving Kerberos behavior. Done means the authenticated session is treated as connected and startup succeeds.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
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:

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:

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.

Ngôn ngữ chính
Java
Star
505
Fork
258
Merge trung bình
4 ngày 20 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/helix

Tất cả issue của apache/helix

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.