jetcd
jetcd copied to clipboard
Unable to catch any connection error
Versions
- etcd: v3.4.15
- jetcd: 0.7.1
- java: jdk1.8.0_212
Describe the bug When connection error happened(connection refused/ssl handleshake failuer...), jetcd will try to reconnect in infinite, and there is never any Exception throw out, so it is unable to know what is wrong.
To Reproduce
- run a etcd server : (certs are all in the reproduce example)
etcd-v3.4.15-windows-amd64/etcd.exe --cert-file etcd.cer --key-file etcd-pkcs8.pem --trusted-ca-file ca.cer --client-cert-auth --listen-client-urls 'https://127.0.0.1:2379' --advertise-client-urls 'https://127.0.0.1:2379'
-
run the reproduce example
Application
-
uncoment this line, and the exampel works well
2022-06-12 15:17:33.271 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 0
2022-06-12 15:17:37.685 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 1
2022-06-12 15:17:42.686 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 2
2022-06-12 15:17:47.686 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 3
2022-06-12 15:17:52.685 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 4
2022-06-12 15:17:57.687 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 5
2022-06-12 15:18:02.686 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 6
2022-06-12 15:18:07.687 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 7
2022-06-12 15:18:12.687 INFO 36648 --- [ntloop-thread-0] org.example.EtcdClient : watch response, key: test, value: 8
Thanks a lot!
Are you able to digg into the issue a little bit more ?
I have debugged the code a lot, but the async code in future/promise is just so complicated for me.
i am also facing same exception. incase etcd is down , the thread stuck and doesn't proceed.
Etcd server have not some error response, I have try to do the samthing on go client and reproduce it.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.