当Hadoop 2.7在Windows 7 64位上启动时:名称或服务未知 [英] When Hadoop 2.7 start on windows 7 64 bits: Name or service not knownstname localhost

查看:43
本文介绍了当Hadoop 2.7在Windows 7 64位上启动时:名称或服务未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Cygwin在Windows 7 64bits上安装Hadoop.成功格式化Hadoop之后,我想使用以下命令启动它:start-dfs.sh.但报告为:

I am installing Hadoop on window 7 64bits with Cygwin. After I format the Hadoop successfully, I want start it use the command: start-dfs.sh. but it reports as:

$ sbin/start-dfs.sh
17/03/26 17:35:27 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
]tarting namenodes on [localhost
: Name or service not knownstname localhost
alwang@localhost's password:
localhost: starting datanode, logging to /home/alwang/hadoop/logs/hadoop-alwang-datanode-alwang-lt.out
]tarting secondary namenodes [0.0.0.0
: Name or service not knownstname 0.0.0.0
17/03/26 17:37:48 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

名称或服务不明身份localhost

这是我的配置文件: core-site.xml

<configuration>  
    <property>  
    <name>fs.default.name</name>  
    <value>hdfs://localhost:9000</value>  
  </property> 
</configuration>

hdfs-site.xml

<configuration>  
<property>  
  <name>dfs.replication</name>  
  <value>1</value>  
</property>  
<property>
    <name>dfs.namenode.name.dir</name>
    <value>file:/hadoop/data/dfs/namenode</value>
</property>
<property>
    <name>dfs.datanode.data.dir</name>
    <value>file:/hadoop/data/dfs/datanode</value>
</property>

mapred-site.xml

   <configuration>  
    <property>  
       <name>mapred.job.tracker</name>  
       <value>localhost:9001</value>  
      </property>  
      <property>  
       <name>mapred.child.tmp</name>  
       <value>/home/u/hadoop/tmp</value>  
      </property>  
</configuration>

我注意到链接上还有其他人在问这个问题:名称或服务不正确已知

I have noticed there is someone else asks this at the link: name or service not known

但是到目前为止,还没有正确的答案.

But till now there is no correct answer.

谢谢.

推荐答案

我一直在对Ubuntu服务器上的该问题进行故障排除.关于"WARN util.NativeCodeLoader:无法为您的本地加载Hadoop库...",请检查环境变量并确保Java路径指向64位二进制文​​件.这为我解决了这个问题.

I've been troubleshooting this issue on my Ubuntu servers. Regarding the "WARN util.NativeCodeLoader: Unable to load native-hadoop library for your..." Check your environment variables and make sure that your Java path is pointing to the 64 bit binaries. That fixed the issue for me.

这篇关于当Hadoop 2.7在Windows 7 64位上启动时:名称或服务未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆