Workflow error logs are disabled in Oozie 4.2

I am using Oozie 4.2, which comes with HDP 2.3.

While working with a few examples of the workflow that comes with the oozie package, I noticed that the "job error log is disabled" and this makes debugging very difficult in the event of a failure. I tried to execute the commands below,

# oozie job -config /home/santhosh/examples/apps/hive/job.properties -run job: 0000063-150904123805993-oozie-oozi-W # oozie job -errorlog 0000063-150904123805993-oozie-oozi-W 

Error log is disabled!

Can someone tell me how to enable workflow error log for oozie?

+6
source share
2 answers

In the Oozie user interface, the "Job Error Log" is a tab that was introduced in HDP v2.3 on Oozie v4.2.
This is the easiest way to find the error for the specified oozie job from the oozie log file.

To enable the oozie error log, make the following changes to the oozie log4j properties file:

  • Add the line set below after log4j.appender.oozie and before log4j.appender.oozieops:
 log4j.appender.oozieError=org.apache.log4j.rolling.RollingFileAppender log4j.appender.oozieError.RollingPolicy=org.apache.oozie.util.OozieRollingPolicy log4j.appender.oozieError.File=${oozie.log.dir}/oozie-error.log log4j.appender.oozieError.Append=true log4j.appender.oozieError.layout=org.apache.log4j.PatternLayout log4j.appender.oozieError.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - SERVER[${oozie.instance.id}] %m%n log4j.appender.oozieError.RollingPolicy.FileNamePattern=${log4j.appender.oozieError.File}-%d{yyyy-MM-dd-HH} log4j.appender.oozieError.RollingPolicy.MaxHistory=720 log4j.appender.oozieError.filter.1 = org.apache.log4j.varia.LevelMatchFilter log4j.appender.oozieError.filter.1.levelToMatch = WARN log4j.appender.oozieError.filter.2 = org.apache.log4j.varia.LevelMatchFilter log4j.appender.oozieError.filter.2.levelToMatch = ERROR log4j.appender.oozieError.filter.3 =`enter code here` org.apache.log4j.varia.LevelMatchFilter log4j.appender.oozieError.filter.3.levelToMatch = FATAL log4j.appender.oozieError.filter.4 = org.apache.log4j.varia.DenyAllFilter 
  1. Change the following from log4j.logger.org.apache.oozie = WARN, oozie to log4j.logger.org.apache.oozie = ALL, oozie, oozieError

  2. Restart the oozie service. This will help you get a job error log for new jobs that started after the oozie service restarted.

+1
source

As already mentioned, the error is new and may not be available for valid reasons. However, it seems that you are mistaken in expecting an oozie error log.

The error log is for a subset of the log file. This is not an addition to it.

So, yes, this can make debugging easier, but if you checked the oozie log and did not find what you were looking for, the error log will not be the solution for you.

You probably need to look at the log of the main tasks that can be found through an external identifier.

0
source

All Articles