Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 16B621136C for ; Wed, 2 Jul 2014 19:14:25 +0000 (UTC) Received: (qmail 73947 invoked by uid 500); 2 Jul 2014 19:14:25 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 73901 invoked by uid 500); 2 Jul 2014 19:14:24 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 73887 invoked by uid 99); 2 Jul 2014 19:14:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2014 19:14:24 +0000 Date: Wed, 2 Jul 2014 19:14:24 +0000 (UTC) From: "Mit Desai (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-2240) yarn logs can get corrupted if the aggregator does not have permissions to the log file it tries to read MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-2240?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D14050= 580#comment-14050580 ]=20 Mit Desai commented on YARN-2240: --------------------------------- Aggregated Logs Comment [~vinodkv], here is the error on which it fails. {noformat} 2014-06-10 22:06:34,940 [LogAggregationService #1922] ERROR logaggregation.AggregatedLogFormat: Error aggregating log file. Log file : /grid/0/tmp/yarn-logs/application_1401475649625_135179/container_1401475649= 625_135179_01_000001/history.txt.appattempt_1401475649625_135179_000001/gri= d/0/tmp/yarn-logs/application_1401475649625_135179/container_1401475649625_= 135179_01_000001/history.txt.appattempt_1401475649625_135179_000001 (Permission denied) java.io.FileNotFoundException: /grid/0/tmp/yarn-logs/application_1401475649625_135179/container_1401475649= 625_135179_01_000001/history.txt.appattempt_1401475649625_135179_000001 (Permission denied) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at org.apache.hadoop.io.SecureIOUtils.forceSecureOpenForRead(SecureIOUtils.jav= a:215) at org.apache.hadoop.io.SecureIOUtils.openForRead(SecureIOUtils.java:204) at org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogValue.write(Ag= gregatedLogFormat.java:196) at org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogWriter.append(= AggregatedLogFormat.java:311) at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.A= ppLogAggregatorImpl.uploadLogsForContainer(AppLogAggregatorImpl.java:130) at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.A= ppLogAggregatorImpl.doAppLogAggregation(AppLogAggregatorImpl.java:166) at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.A= ppLogAggregatorImpl.run(AppLogAggregatorImpl.java:140) at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.L= ogAggregationService$2.run(LogAggregationService.java:354) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 615) at java.lang.Thread.run(Thread.java:722) {noformat} I managed to get into the logs and found that the length for the logs it wa= s reporting was 111K and the corrupted aggregated would read something like= this. The portion of the aggregated logs where there is the problem is here. {noformat} [...] LogType: history.txt.appattempt_1401475649625_135179_000001 LogLength: 111686 Log Contents: Error aggregating log file. Log file : /grid/0/tmp/yarn-logs/application_1401475649625_135179/container_1401475649= 625_135179_01_000001/history.txt.appattempt_1401475649625_135179_000001/gri= d/0/tmp/yarn-logs/application_1401475649625_135179/container_1401475649625_= 135179_01_000001/history.txt.appattempt_1401475649625_135179_000001 (Permission denied)=06stderr=010!stderr_dag_1401475649625_135179_1=010&stderr_dag_14014= 75649625_135179_1_post=010=06stdout=010!stdout_dag_1401475649625_135179_1= =010&stdout_dag_1401475649625_135179_1_post=010=06syslog102042014-06-10 22:05:58,519 INFO [main] org.apache.tez.dag.app.DAGAppMaster: Created DAGAppMaster for application appattempt_1401475649625_135179_000001 [...] {noformat} > yarn logs can get corrupted if the aggregator does not have permissions t= o the log file it tries to read > -------------------------------------------------------------------------= ------------------------------- > > Key: YARN-2240 > URL: https://issues.apache.org/jira/browse/YARN-2240 > Project: Hadoop YARN > Issue Type: Bug > Affects Versions: 2.5.0 > Reporter: Mit Desai > > When the log aggregator is aggregating the logs, it writes the file lengt= h first. Then tries to open the log file and if it does not have permission= to do that, it ends up just writing an error message to the aggregated log= s. > The mismatch between the file length and the actual length here makes the= aggregated logs corrupted. -- This message was sent by Atlassian JIRA (v6.2#6252)