Misleading message is logged during retries if the service not exists

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, kubernetes
Lĩnh vực
distributed-systems

Hướng nghiên cứu

Bắt đầu từ cấu hình service discovery của Kubernetes sử dụng setEnabled(true), namespace và service-name, sau đó lần theo việc ghi log retry liên quan đến service đã cấu hình. Tái hiện trường hợp thiếu test-service và so sánh thông báo retry với lỗi GET xảy ra sau đó. Hoàn tất khi thông tin retry được ghi log phản ánh chính xác liệu service bị thiếu hay Kubernetes API không thể truy cập.

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

Mô tả

When the configured service not exists, the logged messages can be misleading.

When service discovery is set up to use a service which not exists, the following message get logged during the retires:
Couldn't connect to the Kubernetes master, [%s] retrying in %s seconds...

Based on the error message, I assumed that the API server is unaccessiable from the pod.

After 10 retries I got the real error message:
Failure executing: GET at: https://kubernetes.default.svc/api/v1/namespaces/test/endpoints/test-service

Configuration:

config.getNetworkConfig().getJoin().getKubernetesConfig().setEnabled(true)
                    .setProperty("namespace", "test")
                    .setProperty("service-name", "test-service");

It's not a big deal at all, however it can lead to a few hour long debug session if your application is killed by the readiness check before the real error message get logged.

Ngôn ngữ chính
Java
Star
558
Fork
599
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 hazelcast/hazelcast-code-samples

Tất cả issue của hazelcast/hazelcast-code-samples

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.