{"action":"created","issue":{"url":"https://api.github.com/repos/jurmous/etcd4j/issues/85","repository_url":"https://api.github.com/repos/jurmous/etcd4j","labels_url":"https://api.github.com/repos/jurmous/etcd4j/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/jurmous/etcd4j/issues/85/comments","events_url":"https://api.github.com/repos/jurmous/etcd4j/issues/85/events","html_url":"https://github.com/jurmous/etcd4j/issues/85","id":142017511,"number":85,"title":"SocketException - can't assign requested address","user":{"login":"JohnMurray","id":228978,"avatar_url":"https://avatars.githubusercontent.com/u/228978?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnMurray","html_url":"https://github.com/JohnMurray","followers_url":"https://api.github.com/users/JohnMurray/followers","following_url":"https://api.github.com/users/JohnMurray/following{/other_user}","gists_url":"https://api.github.com/users/JohnMurray/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnMurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnMurray/subscriptions","organizations_url":"https://api.github.com/users/JohnMurray/orgs","repos_url":"https://api.github.com/users/JohnMurray/repos","events_url":"https://api.github.com/users/JohnMurray/events{/privacy}","received_events_url":"https://api.github.com/users/JohnMurray/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-19T02:04:29Z","updated_at":"2016-03-22T17:17:05Z","closed_at":null,"body":"I'm getting some `SocketException`s  sporadically when developing on my Mac. I can pretty reliably reproduce the issue with the following test (was testing other properties, but ended up finding this fun one)\r\n\r\n```java\r\n    @Test public void testSharedClient() throws Exception{\r\n        EtcdClient client = new EtcdClient(\r\n            URI.create(\"http://127.0.0.1:12379\"),\r\n            URI.create(\"http://127.0.0.1:22379\"),\r\n            URI.create(\"http://127.0.0.1:32379\")\r\n        );\r\n        for (int i = 0; i < 10_000; i++) {\r\n            Thread t = new Thread(() -> {\r\n                try {\r\n                    client.put(\"test\", \"test\").ttl(3600).send().get();\r\n                    client.get(\"test\").send().get();\r\n                } catch (Exception e) {\r\n                    e.printStackTrace();\r\n                }\r\n            });\r\n            t.start();\r\n            client.put(\"test-2\", \"test-2\").ttl(3600).send().get();\r\n            t.join();\r\n        }\r\n    }\r\n```\r\n\r\nIt seems it may be related to IPv6 based on the literature I can find online for this error and it does seem to be resolved by adding the following system-property. \r\n\r\n```\r\n-Djava.net.preferIPv4Stack=true\r\n```\r\n\r\nJust thought this might be worth adding to the readme as a note / caveat / warning. "},"comment":{"url":"https://api.github.com/repos/jurmous/etcd4j/issues/comments/199913821","html_url":"https://github.com/jurmous/etcd4j/issues/85#issuecomment-199913821","issue_url":"https://api.github.com/repos/jurmous/etcd4j/issues/85","id":199913821,"user":{"login":"lburgazzoli","id":1868933,"avatar_url":"https://avatars.githubusercontent.com/u/1868933?v=3","gravatar_id":"","url":"https://api.github.com/users/lburgazzoli","html_url":"https://github.com/lburgazzoli","followers_url":"https://api.github.com/users/lburgazzoli/followers","following_url":"https://api.github.com/users/lburgazzoli/following{/other_user}","gists_url":"https://api.github.com/users/lburgazzoli/gists{/gist_id}","starred_url":"https://api.github.com/users/lburgazzoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lburgazzoli/subscriptions","organizations_url":"https://api.github.com/users/lburgazzoli/orgs","repos_url":"https://api.github.com/users/lburgazzoli/repos","events_url":"https://api.github.com/users/lburgazzoli/events{/privacy}","received_events_url":"https://api.github.com/users/lburgazzoli/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T17:17:04Z","updated_at":"2016-03-22T17:17:04Z","body":"I've tried to reproduce the error but I do not get it, can you post the full stack trace ?"}}