You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by surendra lilhore <su...@huawei.com> on 2014/09/22 09:02:10 UTC

Issue with DN and NN connection.

Hi all,

                I just found one issue in DataNode and Namenode connection. I am not sure it is issue or not.

                Issue :

                                My one DN machine have two IP (float and private).
                                I have configured private IP in "dfs.datanode.address" .

                                But when my DN stated, it's using float IP for namenode communication.

                                Here 10.18.0.117 is private and 10.18.0.108 is float IP for DN machine

                                  netstat -tanpl | grep 2394
                                [cid:image001.png@01CFD658.8B88ACD0]

In my namenode machine(10.18.0.114) for DN float IP /etc/hosts mapping is not there , so Datanode registration is failing saying "not able to get DN hostname".

                                Logs from Namenode
org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: Datanode denied communication with namenode because hostname cannot be resolved (ip=10.18.0.108, hostname=10.18.0.108): DatanodeRegistration(10.18.0.117, datanodeUuid=0ed5012a-7ef6-4b55-b87b-fec70296faa3, infoPort=25002, ipcPort=50020, storageInfo=lv=-55;cid=myhacluster;nsid=1613974306;c=0)
       at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:806)
       at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:4313)


                                My question is "why DN is using float IP for Namenode communication ?", it should use private IP only because in  "dfs.datanode.address" I have configured private IP.


Thanks & Regards
Surendra


________________________________
This e-mail and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!

RE: Issue with DN and NN connection.

Posted by surendra lilhore <su...@huawei.com>.
Thanks Vinay for reply


-----Original Message-----
From: Vinayakumar B [mailto:vinayakumarb@apache.org] 
Sent: 22 September 2014 PM 04:20
To: hdfs-dev@hadoop.apache.org
Subject: Re: Issue with DN and NN connection.

Hi Surendra,

Since, both public and private IPs are in same subnet, DN machien choosing public interface to connect to NN, for which no mapping present in NN machine.

Separate your IPs to different segments for private and public, then communication will happen through corresponding interface.

Regards,
Vinay

Regards,
Vinay

On Mon, Sep 22, 2014 at 1:54 PM, Steve Loughran <st...@hortonworks.com>
wrote:

> On 22 September 2014 08:02, surendra lilhore 
> <su...@huawei.com>
> wrote:
>
> > org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException:
> *Datanode
> > denied communication with namenode because hostname cannot be 
> > resolved* (ip=10.18.0.108, hostname=10.18.0.108): 
> > DatanodeRegistration(10.18.0.117, 
> > datanodeUuid=0ed5012a-7ef6-4b55-b87b-fec70296faa3, infoPort=25002, 
> > ipcPort=50020, 
> > storageInfo=lv=-55;cid=myhacluster;nsid=1613974306;c=0)
> >
> >        at
> >
> org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.register
> Datanode(DatanodeManager.java:806)
> >
> >        at
> >
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(F
> SNamesystem.java:4313)
> >
> >
> >
>
> 1. From a stack trace you are free to go back and work out what is 
> happening.
> 2. By the look of things, It's  happening in the NN, working out who 
> is calling it
>
>   public void registerDatanode(DatanodeRegistration nodeReg)
>       throws DisallowedDatanodeException, UnresolvedTopologyException {
>     InetAddress dnAddress = *Server.getRemoteIp();*
>
>
> As to why it's using the private IP over public, that's probably a 
> decision by the networking stack deciding which interface can get packets to the NN.
>
>
>
> You do appear to be able to turn that check off:
>
>       if (checkIpHostnameInRegistration && !isNameResolved(dnAddress)) {
>         ...
> }
>
> which comes down to a configurable check:
>
>
>   public static final String
> DFS_NAMENODE_DATANODE_REGISTRATION_IP_HOSTNAME_CHECK_KEY = 
> "dfs.namenode.datanode.registration.ip-hostname-check";
>   public static final boolean
> DFS_NAMENODE_DATANODE_REGISTRATION_IP_HOSTNAME_CHECK_DEFAULT = true;
>
>
> try setting it to false and the check will be skipped. Be advised 
> though -the NN does appear to save the senders IP to use for the RPC 
> channel in future, so if the NN cannot reach the DN via the same IP 
> address that it registered on —you won't have a file system.
>
> I'd play with network settings, especially the routing options on your 
> floating vs VPN addresses.
>
> --
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or 
> entity to which it is addressed and may contain information that is 
> confidential, privileged and exempt from disclosure under applicable 
> law. If the reader of this message is not the intended recipient, you 
> are hereby notified that any printing, copying, dissemination, 
> distribution, disclosure or forwarding of this communication is 
> strictly prohibited. If you have received this communication in error, 
> please contact the sender immediately and delete it from your system. Thank You.
>

Re: Issue with DN and NN connection.

Posted by Vinayakumar B <vi...@apache.org>.
Hi Surendra,

Since, both public and private IPs are in same subnet, DN machien choosing
public interface to connect to NN, for which no mapping present in NN
machine.

Separate your IPs to different segments for private and public, then
communication will happen through corresponding interface.

Regards,
Vinay

Regards,
Vinay

On Mon, Sep 22, 2014 at 1:54 PM, Steve Loughran <st...@hortonworks.com>
wrote:

> On 22 September 2014 08:02, surendra lilhore <su...@huawei.com>
> wrote:
>
> > org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException:
> *Datanode
> > denied communication with namenode because hostname cannot be resolved*
> > (ip=10.18.0.108, hostname=10.18.0.108): DatanodeRegistration(10.18.0.117,
> > datanodeUuid=0ed5012a-7ef6-4b55-b87b-fec70296faa3, infoPort=25002,
> > ipcPort=50020, storageInfo=lv=-55;cid=myhacluster;nsid=1613974306;c=0)
> >
> >        at
> >
> org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:806)
> >
> >        at
> >
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:4313)
> >
> >
> >
>
> 1. From a stack trace you are free to go back and work out what is
> happening.
> 2. By the look of things, It's  happening in the NN, working out who is
> calling it
>
>   public void registerDatanode(DatanodeRegistration nodeReg)
>       throws DisallowedDatanodeException, UnresolvedTopologyException {
>     InetAddress dnAddress = *Server.getRemoteIp();*
>
>
> As to why it's using the private IP over public, that's probably a decision
> by the networking stack deciding which interface can get packets to the NN.
>
>
>
> You do appear to be able to turn that check off:
>
>       if (checkIpHostnameInRegistration && !isNameResolved(dnAddress)) {
>         ...
> }
>
> which comes down to a configurable check:
>
>
>   public static final String
> DFS_NAMENODE_DATANODE_REGISTRATION_IP_HOSTNAME_CHECK_KEY =
> "dfs.namenode.datanode.registration.ip-hostname-check";
>   public static final boolean
> DFS_NAMENODE_DATANODE_REGISTRATION_IP_HOSTNAME_CHECK_DEFAULT = true;
>
>
> try setting it to false and the check will be skipped. Be advised though
> -the NN does appear to save the senders IP to use for the RPC channel in
> future, so if the NN cannot reach the DN via the same IP address that it
> registered on —you won't have a file system.
>
> I'd play with network settings, especially the routing options on your
> floating vs VPN addresses.
>
> --
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.
>

Re: Issue with DN and NN connection.

Posted by Steve Loughran <st...@hortonworks.com>.
On 22 September 2014 08:02, surendra lilhore <su...@huawei.com>
wrote:

> org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: *Datanode
> denied communication with namenode because hostname cannot be resolved*
> (ip=10.18.0.108, hostname=10.18.0.108): DatanodeRegistration(10.18.0.117,
> datanodeUuid=0ed5012a-7ef6-4b55-b87b-fec70296faa3, infoPort=25002,
> ipcPort=50020, storageInfo=lv=-55;cid=myhacluster;nsid=1613974306;c=0)
>
>        at
> org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:806)
>
>        at
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:4313)
>
>
>

1. From a stack trace you are free to go back and work out what is
happening.
2. By the look of things, It's  happening in the NN, working out who is
calling it

  public void registerDatanode(DatanodeRegistration nodeReg)
      throws DisallowedDatanodeException, UnresolvedTopologyException {
    InetAddress dnAddress = *Server.getRemoteIp();*


As to why it's using the private IP over public, that's probably a decision
by the networking stack deciding which interface can get packets to the NN.



You do appear to be able to turn that check off:

      if (checkIpHostnameInRegistration && !isNameResolved(dnAddress)) {
        ...
}

which comes down to a configurable check:


  public static final String
DFS_NAMENODE_DATANODE_REGISTRATION_IP_HOSTNAME_CHECK_KEY =
"dfs.namenode.datanode.registration.ip-hostname-check";
  public static final boolean
DFS_NAMENODE_DATANODE_REGISTRATION_IP_HOSTNAME_CHECK_DEFAULT = true;


try setting it to false and the check will be skipped. Be advised though
-the NN does appear to save the senders IP to use for the RPC channel in
future, so if the NN cannot reach the DN via the same IP address that it
registered on —you won't have a file system.

I'd play with network settings, especially the routing options on your
floating vs VPN addresses.

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.