[
https://issues.apache.org/jira/browse/HDFS-11935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yiqun Lin updated HDFS-11935:
-----------------------------
Description:
{{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 {{updatedAddr.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.
was:
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 wrong 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 {{updatedAddr.getHostString() + ":" + listenAddr.getPort()}} to
replace {{listenAddr.getHostString() + ":" + listenAddr.getPort()}}.
> 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
>
> {{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 {{updatedAddr.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.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]