Closed pankaj-cashify closed 6 years ago
When I use DNS server name instead of IP for etcd URL. The ETCD clients either hangs for long period of time or return result after 30 seconds or so.
EtcdClient etcd = new EtcdClient(URI.create("http://etcd.prv.api.abcd.in:80")); String value = etcd.get("test").send().get().getNode().getValue(); System.out.println("value: " + value);
Above code works fine if I use URL as http://127.0.0.1:2379
did you try with etcdctl ?
I can run 'curl http://etcd.prv.api.abcd.in:80/v2/keys/test' fine
Ignore this issue. Seems it was some issue with IDE.
When I use DNS server name instead of IP for etcd URL. The ETCD clients either hangs for long period of time or return result after 30 seconds or so.
EtcdClient etcd = new EtcdClient(URI.create("http://etcd.prv.api.abcd.in:80")); String value = etcd.get("test").send().get().getNode().getValue(); System.out.println("value: " + value);
Above code works fine if I use URL as http://127.0.0.1:2379