{"action":"created","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/5072","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/5072/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/5072/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/5072/events","html_url":"https://github.com/hazelcast/hazelcast/issues/5072","id":68700759,"number":5072,"title":"Socket connection timeout caused by reverse name lookup delay","user":{"login":"rofsdahl","id":9367393,"avatar_url":"https://avatars.githubusercontent.com/u/9367393?v=3","gravatar_id":"","url":"https://api.github.com/users/rofsdahl","html_url":"https://github.com/rofsdahl","followers_url":"https://api.github.com/users/rofsdahl/followers","following_url":"https://api.github.com/users/rofsdahl/following{/other_user}","gists_url":"https://api.github.com/users/rofsdahl/gists{/gist_id}","starred_url":"https://api.github.com/users/rofsdahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rofsdahl/subscriptions","organizations_url":"https://api.github.com/users/rofsdahl/orgs","repos_url":"https://api.github.com/users/rofsdahl/repos","events_url":"https://api.github.com/users/rofsdahl/events{/privacy}","received_events_url":"https://api.github.com/users/rofsdahl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Team:%20QuSP","name":"Team: QuSP","color":"009800"},{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Type:%20Defect","name":"Type: Defect","color":"fc2929"},{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/VERIFIED","name":"VERIFIED","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars.githubusercontent.com/u/158619?v=3","gravatar_id":"","url":"https://api.github.com/users/jerrinot","html_url":"https://github.com/jerrinot","followers_url":"https://api.github.com/users/jerrinot/followers","following_url":"https://api.github.com/users/jerrinot/following{/other_user}","gists_url":"https://api.github.com/users/jerrinot/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrinot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrinot/subscriptions","organizations_url":"https://api.github.com/users/jerrinot/orgs","repos_url":"https://api.github.com/users/jerrinot/repos","events_url":"https://api.github.com/users/jerrinot/events{/privacy}","received_events_url":"https://api.github.com/users/jerrinot/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55","html_url":"https://github.com/hazelcast/hazelcast/milestones/3.5","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55/labels","id":819785,"number":55,"title":"3.5","description":null,"creator":{"login":"sancar","id":570462,"avatar_url":"https://avatars.githubusercontent.com/u/570462?v=3","gravatar_id":"","url":"https://api.github.com/users/sancar","html_url":"https://github.com/sancar","followers_url":"https://api.github.com/users/sancar/followers","following_url":"https://api.github.com/users/sancar/following{/other_user}","gists_url":"https://api.github.com/users/sancar/gists{/gist_id}","starred_url":"https://api.github.com/users/sancar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancar/subscriptions","organizations_url":"https://api.github.com/users/sancar/orgs","repos_url":"https://api.github.com/users/sancar/repos","events_url":"https://api.github.com/users/sancar/events{/privacy}","received_events_url":"https://api.github.com/users/sancar/received_events","type":"User","site_admin":false},"open_issues":122,"closed_issues":392,"state":"open","created_at":"2014-10-09T13:04:53Z","updated_at":"2015-04-19T21:07:45Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-04-15T14:43:24Z","updated_at":"2015-04-19T21:21:04Z","closed_at":null,"body":"**With one member running, when starting a second member it takes 5 minutes before it joins the cluster.**\r\n\r\n* Hazelcast version 3.4.2, java version 1.8\r\n* Using 2 members (one Windows 7, one Oracle Linux 7 running in VM)\r\n* Not using multicast\r\n* Members manually configured with IP addresses\r\n* **Host names not registered in DNS (nor in /etc/hosts)**\r\n\r\nWhen TcpIpConnectionManager calls InetAddress.getHostName() from assignSocketChannel(), then a reverse name lookup is initiated (since the host names are not registered in DNS, nor in /etc/hosts). getHostName blocks for ~5 seconds (before it falls back to returning the IP address as host name). This causes socket connection timeout in the main thread (TcpIpJoiner gives up connecting after 5 seconds by default). Merging with the other node happens after split brain recovery is done (default after 300 seconds). See log A.\r\n\r\nWhen the host name is registered in DNS or /etc/hosts, then getHostName() returns immediately, so that no timeout occurs for the socket connection in the main thread. See log B.\r\n\r\nIs it possible to avoid calling getHostName if IP addresses are configured, or at least increase the default socket connection timeout value to >5 seconds?\r\n\r\nLog A (host names NOT registered in DNS): http://pastebin.com/StGfVL8q\r\nLog B (host names registered in DNS): http://pastebin.com/VzExp9NF"},"comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments/94316419","html_url":"https://github.com/hazelcast/hazelcast/issues/5072#issuecomment-94316419","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/5072","id":94316419,"user":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars.githubusercontent.com/u/158619?v=3","gravatar_id":"","url":"https://api.github.com/users/jerrinot","html_url":"https://github.com/jerrinot","followers_url":"https://api.github.com/users/jerrinot/followers","following_url":"https://api.github.com/users/jerrinot/following{/other_user}","gists_url":"https://api.github.com/users/jerrinot/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrinot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrinot/subscriptions","organizations_url":"https://api.github.com/users/jerrinot/orgs","repos_url":"https://api.github.com/users/jerrinot/repos","events_url":"https://api.github.com/users/jerrinot/events{/privacy}","received_events_url":"https://api.github.com/users/jerrinot/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T21:21:04Z","updated_at":"2015-04-19T21:21:04Z","body":"Many thanks for a really nice bug report! \r\nWe will fix in the upcoming Hazelcast 3.5 and the fix will likely be ported to a 3.4.x line as well."}}