{"action":"created","issue":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9886","labels_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9886/labels{/name}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9886/comments","events_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9886/events","html_url":"https://github.com/elasticsearch/elasticsearch/pull/9886","id":58947685,"number":9886,"title":"Tests: check node ports availability when using unicast discovery","user":{"login":"jaymode","id":4339958,"avatar_url":"https://avatars.githubusercontent.com/u/4339958?v=3","gravatar_id":"","url":"https://api.github.com/users/jaymode","html_url":"https://github.com/jaymode","followers_url":"https://api.github.com/users/jaymode/followers","following_url":"https://api.github.com/users/jaymode/following{/other_user}","gists_url":"https://api.github.com/users/jaymode/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymode/subscriptions","organizations_url":"https://api.github.com/users/jaymode/orgs","repos_url":"https://api.github.com/users/jaymode/repos","events_url":"https://api.github.com/users/jaymode/events{/privacy}","received_events_url":"https://api.github.com/users/jaymode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/labels/review","name":"review","color":"0052cc"},{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/labels/test","name":"test","color":"5319e7"},{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/labels/v1.5.0","name":"v1.5.0","color":"dddddd"},{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/labels/v2.0.0","name":"v2.0.0","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-25T18:27:08Z","updated_at":"2015-02-27T14:31:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/9886","html_url":"https://github.com/elasticsearch/elasticsearch/pull/9886","diff_url":"https://github.com/elasticsearch/elasticsearch/pull/9886.diff","patch_url":"https://github.com/elasticsearch/elasticsearch/pull/9886.patch"},"body":"Some tests failures are seen when a node attempts to use a port that is already bound\r\nby some other process on the test machine. This commit adds a bind to test port availability\r\nand iterates over the port range until an available port is found. This reduces the likelihood\r\nof a test node failing to start up due to the port already being bound."},"comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/comments/76402700","html_url":"https://github.com/elasticsearch/elasticsearch/pull/9886#issuecomment-76402700","issue_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9886","id":76402700,"user":{"login":"jaymode","id":4339958,"avatar_url":"https://avatars.githubusercontent.com/u/4339958?v=3","gravatar_id":"","url":"https://api.github.com/users/jaymode","html_url":"https://github.com/jaymode","followers_url":"https://api.github.com/users/jaymode/followers","following_url":"https://api.github.com/users/jaymode/following{/other_user}","gists_url":"https://api.github.com/users/jaymode/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymode/subscriptions","organizations_url":"https://api.github.com/users/jaymode/orgs","repos_url":"https://api.github.com/users/jaymode/repos","events_url":"https://api.github.com/users/jaymode/events{/privacy}","received_events_url":"https://api.github.com/users/jaymode/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T14:31:32Z","updated_at":"2015-02-27T14:31:32Z","body":"@bleskes we start from ```nextPort``` which is a static variable. First time the class is initialized, it is set to the base port. While looking for ports, we increment ```nextPort``` for every try. On the next invocation this class will continue iterating up the port range starting from the port after the last one that was used. Do you see something else that I'm missing?"}}