2

everybody, Recently I used Cygwin64, Maven, JDK1.7x64 and hadoop 2.3.0 Src to build package on Windows 2008 r2 x64,and it build success. Finally I set all parameters of hdfs-site.xml,yarn-site.xml,core-site.xml and mapred-site.xml.

I go forward to format namenode and excute start-dfs.cmd,the namenode and datanode all work fine. But when I excute start-yarn.cmd to start resourcemanager and nodemanager,only the resourcemanager works fine. The nodemanager cmd window shows "The System cannot find the specific batch label - nodemanager"...

Please give me any possible suggestion.

flx
  • 14,146
  • 11
  • 55
  • 70
user3377246
  • 21
  • 1
  • 2

4 Answers4

7

I replaced LF with CRLF in yarn.cmd in %HADOOP_HOME%\bin using and it worked for me (didn't even have to change to ANSI encoding).

Easiest way for me was to use Search->Replace (Ctrl+H) in Notepad++, set the search mode to extended, and replace \n with \r\n.

aoetalks
  • 1,741
  • 1
  • 13
  • 26
  • 6
    In Notepad++, you can go to `Edit -> EOL Conversion -> Windows Format`, then save the file and try again. It works for me. – tanza9 Apr 11 '14 at 16:05
0

Open the yarn.cmd file from %HADOOP_HOME%\bin and save the file with ANSI encoding and also change line endings to windows (CR+LF) from unix (LF) using Notepad2. Then run the below command:

%HADOOP_HOME%\sbin\start-yarn.cmd

It worked fine for me after changing the file encoding.

Manoj
  • 1
  • I did it as you said,but still got the same problem. I guess the difference is that my cmd window encoding is 950 ANSI /OEM:Big5. Finally I solved the problem by using "start yarn org.apache.hadoop.yarn.server.nodemanager.Nodemanager" instead of "start nodemanager". I note here in case of the same situation from someone. – user3377246 Mar 05 '14 at 08:52
0

Just rename Nodemanager to NodeManager.

Neel
  • 2,100
  • 5
  • 24
  • 47
0

Copied from comment by @tanza9

In Notepad++, you can go to Edit -> EOL Conversion -> Windows Format, then save the file and try again.

enter image description here

Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265