1

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

Name or service not knownstname localhost

Here is my config files: 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.

Thanks in advance.

Community
  • 1
  • 1
Allen Wang
  • 11
  • 2

1 Answers1

0

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.

Ryan
  • 61
  • 1
  • 3
  • OK. Thanks. I will try to do that. But for the "Name or service not knownstname localhost " issue, I have some idea, I think the Cygwin should be configed to know thhe localhost, but I don't know how now. I will read some document and search on the site to learn. – Allen Wang Mar 27 '17 at 10:14