0

I am running hadoop 2.7.1 on windows 64 in pseudo-distributed mode, and can't manage to run yarn. Whenever I try to start it via yarn resourcemanager I get the following output:

The system cannot find the batch label specified - resourcemanager
Usage: java [-options] class [args...]
       (to execute a class)
or  java [-options] -jar jarfile [args...]
       (to execute a jar file)
where options include:
-d32          use a 32-bit data model if available
-d64          use a 64-bit data model if available
-server       to select the "server" VM
              The default VM is server.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
              A ; separated list of directories, JAR archives,
              and ZIP archives to search for class files.
-D<name>=<value>
              set a system property
-verbose:[class|gc|jni]
              enable verbose output
-version      print product version and exit
-version:<value>
              Warning: this feature is deprecated and will be removed
              in a future release.
              require the specified version to run
-showversion  print product version and continue
-jre-restrict-search | -no-jre-restrict-search
              Warning: this feature is deprecated and will be removed
              in a future release.
              include/exclude user private JREs in the version search
-? -help      print this help message
-X            print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
              enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
              disable assertions with specified granularity
-esa | -enablesystemassertions
              enable system assertions
-dsa | -disablesystemassertions
              disable system assertions
-agentlib:<libname>[=<options>]
              load native agent library <libname>, e.g. -agentlib:hprof
              see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
              load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
              load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
              show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

I suppose it's likely to be an issue with my current yarn-site.xml, but can't find what it is:

<configuration>
<property>
    <name>yarn.resourcemanager.hostname</name>
    <value>localhost</value>
</property>
<property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
</property>
<property>
    <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
    <value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
    <name>yarn.application.classpath</name>
    <value>
        %HADOOP_HOME%\etc\hadoop,
        %HADOOP_HOME%\share\hadoop\common\*,
        %HADOOP_HOME%\share\hadoop\common\lib\*,
        %HADOOP_HOME%\share\hadoop\mapreduce\*,
        %HADOOP_HOME%\share\hadoop\mapreduce\lib\*,
        %HADOOP_HOME%\share\hadoop\hdfs\*,
        %HADOOP_HOME%\share\hadoop\hdfs\lib\*,
        %HADOOP_HOME%\share\hadoop\yarn\*,
        %HADOOP_HOME%\share\hadoop\yarn\lib\*
    </value>
</property>
</configuration>

Following the only thing I managed to find on the internet about this issue I Tried editing yarn-site.xml changing LF to CRLF in Notepad++, but that didn't help at all.

st1led
  • 385
  • 2
  • 4
  • 18

4 Answers4

2

Try to edit yarn.cmd changing LF to CRLF in Notepad++ located at

...\Hadoop-2.7.1\bin\yarn.cmd

thehennyy
  • 4,020
  • 1
  • 22
  • 31
Hussain VR
  • 21
  • 2
1

I actually managed to fix this issue by downloading a new set of wintools (couldn't really compile them), following this guide: http://toodey.com/2015/08/10/hadoop-installation-on-windows-without-cygwin-in-10-mints/

I just downloaded the zip located at https://github.com/sardetushar/hadooponwindows/archive/master.zip and replaced the /bin directory in the Hadoop home.

st1led
  • 385
  • 2
  • 4
  • 18
0

see Hadoop 2.3.0 over windows 2008 r2 x64 about nodemanager

yorammi
  • 6,272
  • 1
  • 28
  • 34
  • Thanks, I forgot to add this point, especially because this is the only thing it appears on google related to this issue. I Tried editing yarn-site.xml changing LF to CRLF in Notepad++, but that didn't help at all. – st1led Jul 07 '17 at 10:51
0

I had the same problem and solved it by following these steps.

  1. Inside the /hadoop/etc/hadoop and /hadoop/bin directory open the yarn.xml, yarn.sh and yarn.cmd file in notepad++ and using the EOL option from Edit->EOL Conversion, convert from Unix/OSX format to Windows format.

  2. Inside the /hadoop/etc/hadoop directory open mapred-env.cmd, yarn-env.cmd and hadoop-env.cmd and add the respective JAVA_HOME path.