hazelcast / hazelcast/hazelcast-code-samples

Misleading message is logged during retries if the service not exists

Open
#290 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
558
Forks
600
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.