jetcd icon indicating copy to clipboard operation
jetcd copied to clipboard

Unable to catch any connection error

Open copbint opened this issue 2 years ago • 4 comments

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

  1. 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'
  1. run the reproduce example Application

  2. 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!

copbint avatar Jun 12 '22 07:06 copbint

Are you able to digg into the issue a little bit more ?

lburgazzoli avatar Jun 12 '22 08:06 lburgazzoli

I have debugged the code a lot, but the async code in future/promise is just so complicated for me.

copbint avatar Jun 12 '22 09:06 copbint

i am also facing same exception. incase etcd is down , the thread stuck and doesn't proceed.

ankit2610 avatar Jul 01 '22 04:07 ankit2610

Etcd server have not some error response, I have try to do the samthing on go client and reproduce it.

liangyuanpeng avatar Aug 17 '22 05:08 liangyuanpeng

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.

github-actions[bot] avatar Oct 17 '22 02:10 github-actions[bot]