【问题标题】:Setting up Hadoop with Cloudera Manager in Pseudo Distributed mode - Datanode won't start在伪分布式模式下使用 Cloudera Manager 设置 Hadoop - Datanode 不会启动
【发布时间】:2013-10-23 18:14:46
【问题描述】:

我正在尝试使用 Cloudera Manager 设置单节点集群,这是我遇到的最新问题。

当我尝试启动所有服务时,HDFS 无法启动,这似乎是 Datanode 的问题 - 它给出的致命错误消息是

Initialization failed for block pool Block pool BP-1896453393-127.0.1.1-1382183730690 (storage id DS-185043233-127.0.1.1-50010-1382183775494) service to Hadoop1/127.0.1.1:8022
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException): Datanode denied communication with namenode: DatanodeRegistration(127.0.0.1, storageID=DS-185043233-127.0.1.1-50010-1382183775494, infoPort=50075, ipcPort=50020, storageInfo=lv=-40;cid=cluster25;nsid=1577346304;c=0)
at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:656)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:3495)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.registerDatanode(NameNodeRpcServer.java:899)
at 
...

当我运行主机检查器时,它会给出以下警告:

The following errors were found while checking /etc/hosts...

The hostname Hadoop1 maps to 127.0.1.1 in /etc/hosts. 
This setting, typically found in Debian and Ubuntu environments, typically causes issues. 
We recommend either using the standard loopback address (127.0.0.1) or specifying the appropriate IP address for your host.

通过谷歌搜索,问题似乎与使用的 IP 地址有关,问题的根源可能在我的 /etc/hosts 文件中,如下所示。

127.0.0.1   localhost
127.0.1.1   Hadoop1

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters 

【问题讨论】:

    标签: hadoop cloudera cloudera-manager


    【解决方案1】:

    对此进行了排序,我没有在 /etc/hosts 文件中使用 127.0.1.1,而是使用了 ifconfig 的点对点部分中的机器的 IP 地址。

    ifconfig 的输出会有类似的部分

    ppp0      Link encap:Point-to-Point Protocol  
              inet addr:xxx.xxx.xxx.xxx  P-t-P:xx.xx.xx.xx  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1440  Metric:1
              RX packets:800950 errors:1 dropped:0 overruns:0 frame:0
              TX packets:454479 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3 
              RX bytes:1115444967 (1.1 GB)  TX bytes:32007110 (32.0 MB)
    

    从中获取 inet addr: ip。

    或者运行

    ifconfig | grep P-t-P
    

    对于确切的行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-07
      • 2012-09-13
      • 1970-01-01
      • 2012-01-11
      相关资源
      最近更新 更多