Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 78D13200C8C for ; Tue, 6 Jun 2017 14:34:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 778A2160BC3; Tue, 6 Jun 2017 12:34:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 97949160BC6 for ; Tue, 6 Jun 2017 14:34:35 +0200 (CEST) Received: (qmail 90583 invoked by uid 500); 6 Jun 2017 12:34:22 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 90539 invoked by uid 99); 6 Jun 2017 12:34:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2017 12:34:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B58EDC0118 for ; Tue, 6 Jun 2017 12:34:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id B-yBxdBgpwKw for ; Tue, 6 Jun 2017 12:34:19 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1AE645FE4B for ; Tue, 6 Jun 2017 12:34:19 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 554B0E00A3 for ; Tue, 6 Jun 2017 12:34:18 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 15DFA21E0B for ; Tue, 6 Jun 2017 12:34:18 +0000 (UTC) Date: Tue, 6 Jun 2017 12:34:18 +0000 (UTC) From: "Yiqun Lin (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-11935) Ozone: TestStorageContainerManager#testRpcPermission fails when ipv6 address used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 06 Jun 2017 12:34:36 -0000 [ 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.(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. 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.(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. > 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.(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.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org