Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Enable Oozie error log

SOLVED Go to solution
Highlighted

Enable Oozie error log

New Contributor

Hi Team,

I need to enable Oozie error lot which is not done before. Can you let me know the process of doing it. I see few jobs are in RUNNING state in COORDINATOR JOBS. Let me know how to enable Error log without affecting the jobs

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Enable Oozie error log

Super Guru

@suresh krish

Unfortunately you cannot do it without restarting Oozie

Here are the steps:

1. Add the below set of lines 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 = org.apache.log4j.varia.LevelMatchFilter 
log4j.appender.oozieError.filter.3.levelToMatch = FATAL 
log4j.appender.oozieError.filter.4 = org.apache.log4j.varia.DenyAllFilter 
2. Modify below props:

Earlier value:

log4j.logger.org.apache.oozie=WARN, oozie 

New value:

log4j.logger.org.apache.oozie=ALL, oozie, oozieError 
3. Restart Oozie service via Ambari.

Note - This would help in getting the job error log for the new jobs launched after restart of oozie service.

3 REPLIES 3

Re: Enable Oozie error log

Super Guru

@suresh krish

Unfortunately you cannot do it without restarting Oozie

Here are the steps:

1. Add the below set of lines 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 = org.apache.log4j.varia.LevelMatchFilter 
log4j.appender.oozieError.filter.3.levelToMatch = FATAL 
log4j.appender.oozieError.filter.4 = org.apache.log4j.varia.DenyAllFilter 
2. Modify below props:

Earlier value:

log4j.logger.org.apache.oozie=WARN, oozie 

New value:

log4j.logger.org.apache.oozie=ALL, oozie, oozieError 
3. Restart Oozie service via Ambari.

Note - This would help in getting the job error log for the new jobs launched after restart of oozie service.

Re: Enable Oozie error log

New Contributor

@suresh krish , @Kuldeep Kulkarni what is the file in which i have to make these changes . Is it possible to change oozie configuration for shell action by passing these parameters as a log4j.propreties in the configuration tag of the oozie shell action ?

Re: Enable Oozie error log

New Contributor

https://stackoverflow.com/questions/40405538/how-to-enable-setup-log4j-for-oozi-java-workflows

This tells that you can try adding oozie-log4j.properties in your oozie directory (where workflow.xml is).