You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Xiaoyu Yao (JIRA)" <ji...@apache.org> on 2016/10/03 17:59:21 UTC
[jira] [Commented] (HADOOP-13234) Get random port by new
ServerSocket(0).getLocalPort() in ServerSocketUtil#getPort
[ https://issues.apache.org/jira/browse/HADOOP-13234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15542988#comment-15542988 ]
Xiaoyu Yao commented on HADOOP-13234:
-------------------------------------
I've seen a recent instance of Jenkins failure [here|https://builds.apache.org/job/PreCommit-HDFS-Build/16970/testReport/org.apache.hadoop.hdfs/TestDFSShell/testMoveWithTargetPortEmpty/] as shown below, [~brahmareddy], can you confirm if the proposal here will fix the issue?
{code}
Tests run: 48, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 63.928 sec <<< FAILURE! - in org.apache.hadoop.hdfs.TestDFSShell
testMoveWithTargetPortEmpty(org.apache.hadoop.hdfs.TestDFSShell) Time elapsed: 9.026 sec <<< ERROR!
java.io.IOException: Port is already in use; giving up after 10 times.
at org.apache.hadoop.net.ServerSocketUtil.waitForPort(ServerSocketUtil.java:98)
at org.apache.hadoop.hdfs.TestDFSShell.testMoveWithTargetPortEmpty(TestDFSShell.java:809)
{code}
> Get random port by new ServerSocket(0).getLocalPort() in ServerSocketUtil#getPort
> ---------------------------------------------------------------------------------
>
> Key: HADOOP-13234
> URL: https://issues.apache.org/jira/browse/HADOOP-13234
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Brahma Reddy Battula
> Assignee: Brahma Reddy Battula
>
> As per [~iwasakims] comment from [here|https://issues.apache.org/jira/browse/HDFS-10367?focusedCommentId=15275604&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15275604]
> we can get available random port by {{new ServerSocket(0).getLocalPort()}} and it's more portable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org