Question

I have setup hadoop and yarn in standalone mode for now. I am trying to start all process in yarn. All process are started except nodemanager. It is throwing jvm error everytime.

 [root@ip-10-100-223-16 hadoop-0.23.7]# sbin/yarn-daemon.sh start nodemanager
starting nodemanager, logging to /root/hadoop-0.23.7/logs/yarn-root-nodemanager-ip-10-100-223-16.out
Unrecognized option: -jvm
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

What can be the issue? Any help is appreciated.

Was it helpful?

Solution

Following link has a patch for the above issue : https://issues.apache.org/jira/browse/MAPREDUCE-3879

in bin/yarn script, we need to comment following lines. Here :
'-' : shows removal of lines
'+' : shows addition of lines

elif [ "$COMMAND" = "nodemanager" ] ; then
   CLASSPATH=${CLASSPATH}:$YARN_CONF_DIR/nm-config/log4j.properties
   CLASS='org.apache.hadoop.yarn.server.nodemanager.NodeManager'
-  if [[ $EUID -eq 0 ]]; then
-    YARN_OPTS="$YARN_OPTS -jvm server $YARN_NODEMANAGER_OPTS"
-  else
-    YARN_OPTS="$YARN_OPTS -server $YARN_NODEMANAGER_OPTS"
-  fi
+  YARN_OPTS="$YARN_OPTS -server $YARN_NODEMANAGER_OPTS"
 elif [ "$COMMAND" = "proxyserver" ] ; then
   CLASS='org.apache.hadoop.yarn.server.webproxy.WebAppProxyServer'
   YARN_OPTS="$YARN_OPTS $YARN_PROXYSERVER_OPTS"

Above patch is available on this location.

Courtesy LorandBendig for helping me .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top