Detecting connection errors
See original GitHub issueHi!
What is the correct way to do KV requests with a timeout? The client seems to retry forever (jetcd 0.5.10). My code looks like this:
Client etcd = Client.builder()
.endpoints("http://127.0.0.1:2379")
.connectTimeout(Duration.ofSeconds(1))
.build();
CountDownLatch countDownLatch = new CountDownLatch(1);
etcd.getKVClient()
.get(ByteSequence.from("/x", StandardCharsets.UTF_8))
.whenComplete((response, throwable) -> {
if (throwable != null) {
throwable.printStackTrace();
}
System.out.println("response = " + response);
countDownLatch.countDown();
});
countDownLatch.await();
System.out.println("done");
If I run this code without ectd running, it will never terminate. I’ve tried different retry options to the client builder but I can’t get it to work.
Thanks, Anton
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
5 ways to detect and resolve connection errors | Developer Blog
Log in to the EMnify Portal and check the Dashboard. Click on the tab EVENTS. You will see all the network events related...
Read more >Detecting the connection errors
The connection check method is used to check if there are any errors in the connections. If the timeout for detecting the connection...
Read more >13 Tips to Troubleshoot Your Internet Connection - PCMag
1. Try Another Device or Website · 2. Check the Wi-Fi Settings · 3. Check Your Internet Package · 4. Scan for Viruses...
Read more >Detect my SSL connection errors - Site24x7 Support
You can detect your constant SSL connection issues by analyzing your server logs. An SSL connection error normally occurs while establishing a connection...
Read more >How to Detect and Identify Intermittent Network Problems - Obkio
The most accurate way to detect intermittent network problems is by using a continuous Network Monitoring Software, like ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll do it today or tomorrow
On Thu, 28 Oct 2021 at 11:32, Anton Lindström @.***> wrote:
–
Luca Burgazzoli
I’m waiting for feedback on another pr, then I can do a release