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

Hitesh Shah commented on YARN-814:
----------------------------------

Comments:

Why is shExec.getOutput() being ignored ( and replaced with 
exception.getMessage() )? 
Have you run this with a test script that emits information both to stdout and 
stderr? 

{code}
+      LOG.warn("Exception from container-launch with container ID: "
+          + containerId + " and exit code: " + exitCode , e);
+      logOutput(e.getMessage());
{code}
  - logging the exception twice?
  -logOutput() does not seem to log any contextual information - have you 
logged at the NM logs to see if it actually provides useful debugging 
information when running multiple containers at the same time?

{code}
       LOG.warn("Exit code from container is : " + exitCode);
-      logOutput(shExec.getOutput());
+      logOutput(e.getMessage());
{code}
  - Earlier comment about the LOG.warn not being useful not addressed?

{code}
       throw new IOException("App initialization failed (" + exitCode + 
-          ") with output: " + shExec.getOutput(), e);
+          ") with output: " + e.getMessage(), e);
{code}
  - The exception e is already being passed. Why the need to add e.getMessage() 
too? 


                
> Difficult to diagnose a failed container launch when error due to invalid 
> environment variable
> ----------------------------------------------------------------------------------------------
>
>                 Key: YARN-814
>                 URL: https://issues.apache.org/jira/browse/YARN-814
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Hitesh Shah
>            Assignee: Jian He
>         Attachments: YARN-814.1.patch, YARN-814.2.patch, YARN-814.3.patch, 
> YARN-814.patch
>
>
> The container's launch script sets up environment variables, symlinks etc. 
> If there is any failure when setting up the basic context ( before the actual 
> user's process is launched ), nothing is captured by the NM. This makes it 
> impossible to diagnose the reason for the failure. 
> To reproduce, set an env var where the value contains characters that throw 
> syntax errors in bash. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to