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.

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.

Solved Go to solution

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.

New Contributor

I want to load streaming data through a spool directory on to HDFS. I have been using the following configuration file for the same.
# Describe/configure the source

a1.sources.r1.type = spooldir

a1.sources.r1.spoolDir = /root/spool

a1.sources.r1.fileHeader = true

a1.sources.r1.interceptors = timestampInterceptor

a1.sources.r1.interceptors.timestampInterceptor.type = timestamp

# Describe the sink

a1.sinks.k1.type = hdfs

a1.sinks.k1.hdfs.path = /user/root/flume/example

a1.sinks.k1.hdfs.fileType= DataStream

a1.sinks.k1.hdfs.writeFormat= Text

a1.sinks.k1.hdfs.rollInterval = 30

# Use a channel which buffers events in memory

a1.channels.c1.type = memory

a1.channels.c1.capacity = 1000

a1.channels.c1.transactionCapacity = 100

# Bind the source and sink to the channel

a1.sources.r1.channels = c1

a1.sinks.k1.channel = c1

Flume agent command -

cd /usr/hdp/current/flume-server/bin

./flume-ng agent --conf conf --conf-file ~/flumelogs.conf --name a1 -Dflume.root.logger=INFO,console

I have recently upgraded Hortonworks to version 2.6.
These commands worked fine for me with version 2.5 but I got the following error with the new version.

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.


Could you please help me a workaround for this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.

New Contributor

@Navin Agarwala

I faced a similar issue while running the flume command from the command line in HDP 2.6.

/usr/hdp/current/flume-server/bin/flume-ng agent --name agent --conf /usr/hdp/current/flume-server/conf/agent --conf-file /usr/hdp/current/flume-server/conf/agent/flume.conf

I resloved this issue by copying the log4j2.xml file in the location: /usr/hdp/current/flume-server/conf/agent

View solution in original post

2 REPLIES 2
Highlighted

Re: ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.

New Contributor

@Navin Agarwala

I faced a similar issue while running the flume command from the command line in HDP 2.6.

/usr/hdp/current/flume-server/bin/flume-ng agent --name agent --conf /usr/hdp/current/flume-server/conf/agent --conf-file /usr/hdp/current/flume-server/conf/agent/flume.conf

I resloved this issue by copying the log4j2.xml file in the location: /usr/hdp/current/flume-server/conf/agent

View solution in original post

Highlighted

Re: ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.

Expert Contributor

Where did you paste log4j2.xml?

I solved the problem by adding the following :

 

-Dlog4j.configurationFile=/usr/hdp/current/flume-server/conf/log4j2.xml

 

My whole command is:

 

/usr/hdp/current/flume-server/bin/flume-ng agent --conf conf --conf-file /home/maria_dev/flume_uygulama_01/flumelogs.conf --name a1 -Dflume.root.logger=INFO,console -Dlog4j.configurationFile=/usr/hdp/current/flume-server/conf/log4j2.xml

 

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here