hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anbang Hu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11700) testBackupNodePorts doesn't pass on Windows machine
Date Tue, 25 Apr 2017 17:12:04 GMT

    [ https://issues.apache.org/jira/browse/HDFS-11700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983266#comment-15983266
] 

Anbang Hu commented on HDFS-11700:
----------------------------------

More detailed investigation shows that after *Attempt 1* fails, in forcing {{rpcServer}} to
stop, {{listener.doStop()}} in {{Server.stop()}} fails to close the socket properly. Tracing
the code inside {{doStop}}:
{{acceptChannel.socket()}} returns a {{ServerSocketAdaptor}}
-> {{ServerSocketAdaptor.close()}}
-> {{ServerSocketChannelmpl.close()}}
-> {{AbstractInterruptibleChannel.close()}}
-> {{AbstractSelectableChannel.implCloseChannel()}}
-> {{ServerSocketChannelImpl.implCloseSelectableChannel()}}
-> {{SocketDispatcher.preClose()}}
-> {{preClose0(FileDescriptor var0)}}

The difference on Windows and Ubuntu is that after {{preClose0(FileDescriptor var0)}}, the
previously used port becomes available on Ubuntu, but not on Windows. {{preClose0}} is native
method and I am using Oracle Java 1.8.0_121.

> testBackupNodePorts doesn't pass on Windows machine
> ---------------------------------------------------
>
>                 Key: HDFS-11700
>                 URL: https://issues.apache.org/jira/browse/HDFS-11700
>             Project: Hadoop HDFS
>          Issue Type: Bug
>         Environment: Windows 10
>            Reporter: Anbang Hu
>
> In TestHDFSServerPorts.testBackupNodePorts, there are two attempts at starting backup
node.
> *Attempt 1*:
> 1) It binds namenode backup address with 0:
> {quote}
> backup_config.set(DFSConfigKeys.DFS_NAMENODE_BACKUP_ADDRESS_KEY, THIS_HOST);
> {quote}
> 2) It sets namenode backup address with an available port X.
> 3) It fails rightfully due to using the same http address as active namenode.
> *Attempt 2*:
> 1) It tries to reuse port X as namenode backup address.
> 2) It fails to bind to X because Windows does not release port X properly after *Attempt
1* fails.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message