hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11935) Ozone: TestStorageContainerManager#testRpcPermission fails when ipv6 address used
Date Fri, 16 Jun 2017 10:33:00 GMT

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

Yiqun Lin commented on HDFS-11935:
----------------------------------

Hi [~anu], I found the test {{TestKeySpaceManager}} will also ran failed caused by this when
I worked on HDFS-11782.

The stack info:
{noformat}
java.lang.IllegalArgumentException: Does not contain a valid host:port authority: 0:0:0:0:0:0:0:0:58804:9863
	at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:213)
	at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:164)
	at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:153)
	at org.apache.hadoop.ozone.OzoneClientUtils.getScmAddressForBlockClients(OzoneClientUtils.java:193)
	at org.apache.hadoop.ozone.ksm.KeySpaceManager.getScmBlockClient(KeySpaceManager.java:117)
	at org.apache.hadoop.ozone.ksm.KeySpaceManager.<init>(KeySpaceManager.java:100)
	at org.apache.hadoop.ozone.MiniOzoneCluster$Builder.build(MiniOzoneCluster.java:378)
	at org.apache.hadoop.ozone.ksm.TestKeySpaceManager.init(TestKeySpaceManager.java:90)
{noformat}

It looks strange that Jenkins showed that these two tests have been tested and passed, the
reference links:
https://builds.apache.org/job/PreCommit-HDFS-Build/19796/testReport/org.apache.hadoop.ozone/TestStorageContainerManager.
https://builds.apache.org/job/PreCommit-HDFS-Build/19914/testReport/org.apache.hadoop.ozone.ksm/TestKeySpaceManager/

> Ozone: TestStorageContainerManager#testRpcPermission fails when ipv6 address used
> ---------------------------------------------------------------------------------
>
>                 Key: HDFS-11935
>                 URL: https://issues.apache.org/jira/browse/HDFS-11935
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-11935-HDFS-7240.001.patch
>
>
>  {{TestStorageContainerManager#testRpcPermission}} ran failed when ipv6 address used
in my local. The stack infos:
> {noformat}
> java.lang.IllegalArgumentException: Does not contain a valid host:port authority: 0:0:0:0:0:0:0:0:54846:9863
> 	at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:213)
> 	at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:164)
> 	at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:153)
> 	at org.apache.hadoop.ozone.OzoneClientUtils.getScmAddressForBlockClients(OzoneClientUtils.java:193)
> 	at org.apache.hadoop.ozone.ksm.KeySpaceManager.getScmBlockClient(KeySpaceManager.java:117)
> 	at org.apache.hadoop.ozone.ksm.KeySpaceManager.<init>(KeySpaceManager.java:100)
> 	at org.apache.hadoop.ozone.MiniOzoneCluster$Builder.build(MiniOzoneCluster.java:373)
> 	at org.apache.hadoop.ozone.TestStorageContainerManager.testRpcPermissionWithConf(TestStorageContainerManager.java:95)
> 	at org.apache.hadoop.ozone.TestStorageContainerManager.testRpcPermission(TestStorageContainerManager.java:79)
> {noformat}
> {{OzoneClientUtils#getHostName}} will return a invalid host name when input value is
a ipv6 address.
> The root cause of this is that we use {{ListenerAddress}} which can be the Iner6Address
or Iner4Address instance}} to update address in {{OzoneClientUtils#updateListenAddress}}.
> {code}
>   public static InetSocketAddress updateListenAddress(
>       OzoneConfiguration conf, String rpcAddressKey,
>       InetSocketAddress addr, RPC.Server rpcServer) {
>     InetSocketAddress listenAddr = rpcServer.getListenerAddress();
>     InetSocketAddress updatedAddr = new InetSocketAddress(
>        addr.getHostString(), listenAddr.getPort());
>     conf.set(rpcAddressKey,
>         listenAddr.getHostString() + ":" + listenAddr.getPort());
>     return updatedAddr;
>   }
> {code}
> We can use {{addr.getHostString() + ":" + listenAddr.getPort()}} to replace {{listenAddr.getHostString()
+ ":" + listenAddr.getPort()}}. This way should be okay since we just use configured address
to start rpc server and the host name should be same.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
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