[ 
https://issues.apache.org/jira/browse/YARN-6550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173835#comment-16173835
 ] 

Suma Shivaprasad commented on YARN-6550:
----------------------------------------

launch_container script after patch 

{noformat}
#!/bin/bash

export 
STDOUT="/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003/prelaunch.out"
exec >"${STDOUT}"
export 
STDERR="/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003/prelaunch.err"
exec 2>"${STDERR}"
set -o pipefail -e
echo "Setting up env variables"
export 
HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/etc/hadoop"}
export 
STDOUT_LOGFILE_ENV="/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003/stdout"
export HADOOP_ROOT_LOGGER="INFO,console"
export 
JAVA_HOME=${JAVA_HOME:-"/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home"}
export NM_HOST="10.22.16.92"
export LD_LIBRARY_PATH="$PWD:$HADOOP_COMMON_HOME/lib/native"
export 
STDERR_LOGFILE_ENV="/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003/stderr"
export 
HADOOP_HDFS_HOME=${HADOOP_HDFS_HOME:-"/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT"}
export LOGNAME="sshivaprasad"
export JVM_PID="$$"
export 
HADOOP_MAPRED_HOME=${HADOOP_MAPRED_HOME:-"/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT"}
export 
PWD="/tmp/hadoop-sshivaprasad/nm-local-dir/usercache/sshivaprasad/appcache/application_1505931818595_0002/container_1505931818595_0002_01_000003"
export HADOOP_CLIENT_OPTS=""
export 
HADOOP_COMMON_HOME=${HADOOP_COMMON_HOME:-"/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT"}
export 
LOCAL_DIRS="/tmp/hadoop-sshivaprasad/nm-local-dir/usercache/sshivaprasad/appcache/application_1505931818595_0002"
export SHELL="/bin/bash"
export NM_HTTP_PORT="8042"
export 
LOG_DIRS="/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003"
export 
NM_AUX_SERVICE_mapreduce_shuffle="AAA0+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=^M
"
export NM_PORT="65028"
export USER="sshivaprasad"
export 
HADOOP_YARN_HOME=${HADOOP_YARN_HOME:-"/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT"}
export 
CLASSPATH="$PWD:$HADOOP_CONF_DIR:$HADOOP_COMMON_HOME/share/hadoop/common/*:$HADOOP_COMMON_HOME/share/hadoop/common/lib/*:$HADOOP_HDFS_HOME/share/hadoop/hdfs/*:$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*:$HADOOP_YARN_HOME/share/hadoop/yarn/*:$HADOOP_YARN_HOME/share/hadoop/yarn/lib/*:$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*:$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*:job.jar/job.jar:job.jar/classes/:job.jar/lib/*:$PWD/*"
export 
HADOOP_TOKEN_FILE_LOCATION="/tmp/hadoop-sshivaprasad/nm-local-dir/usercache/sshivaprasad/appcache/application_1505931818595_0002/container_1505931818595_0002_01_000003/container_tokens"
export 
LOCAL_USER_DIRS="/tmp/hadoop-sshivaprasad/nm-local-dir/usercache/sshivaprasad/"
export HOME="/home/"
export CONTAINER_ID="container_1505931818595_0002_01_000003"
export MALLOC_ARENA_MAX=""
echo "Setting up job resources"
ln -sf 
"/tmp/hadoop-sshivaprasad/nm-local-dir/usercache/sshivaprasad/appcache/application_1505931818595_0002/filecache/13/job.xml"
 "job.xml"
hadoop_shell_errorcode=$?
if [[ "$hadoop_shell_errorcode" -ne 0 ]]
then
  exit $hadoop_shell_errorcode
fi
ln -sf 
"/tmp/hadoop-sshivaprasad/nm-local-dir/usercache/sshivaprasad/appcache/application_1505931818595_0002/filecache/11/job.jar"
 "job.jar"
hadoop_shell_errorcode=$?
if [[ "$hadoop_shell_errorcode" -ne 0 ]]
then
  exit $hadoop_shell_errorcode
fi
echo "Launching container"
exec /bin/bash -c "$JAVA_HOME/bin/java -Djava.net.preferIPv4Stack=true 
-Dhadoop.metrics.log.level=WARN  -Xmx200m -Djava.io.tmpdir=$PWD/tmp 
-Dlog4j.configuration=container-log4j.properties 
-Dyarn.app.container.log.dir=/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003
 -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA 
-Dhadoop.root.logfile=syslog 
-Dyarn.app.mapreduce.shuffle.logger=INFO,shuffleCLA 
-Dyarn.app.mapreduce.shuffle.logfile=syslog.shuffle 
-Dyarn.app.mapreduce.shuffle.log.filesize=0 
-Dyarn.app.mapreduce.shuffle.log.backups=0 org.apache.hadoop.mapred.YarnChild 
10.22.16.92 65054 attempt_1505931818595_0002_r_000000_0 3 
1>/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003/stdout
 
2>/2017-08-14/hadoop-3.0.0-beta1-SNAPSHOT/logs/userlogs/application_1505931818595_0002/container_1505931818595_0002_01_000003/stderr
 "
hadoop_shell_errorcode=$?
if [[ "$hadoop_shell_errorcode" -ne 0 ]]
then
  exit $hadoop_shell_errorcode
fi
{noformat}

> Capture launch_container.sh logs
> --------------------------------
>
>                 Key: YARN-6550
>                 URL: https://issues.apache.org/jira/browse/YARN-6550
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0-beta1
>            Reporter: Wangda Tan
>            Assignee: Suma Shivaprasad
>         Attachments: YARN-6550.002.patch, YARN-6550.003.patch, 
> YARN-6550.005.patch, YARN-6550.006.patch, YARN-6550.007.patch, 
> YARN-6550.008.patch, YARN-6550.009.patch, YARN-6550.patch
>
>
> launch_container.sh which generated by NM will do a bunch of things (like 
> create link, etc.) while launch a process. No logs captured until {{exec}} is 
> called. We need capture all failures of launch_container.sh for easier 
> troubleshooting.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to