Flume agent not running in the Lab


#1

Getting error while running the following command:
flume-ng agent --name a1 --conf-file /home/soumyajitde/flume_demo/example.conf
Error description:
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.

This is the example.conf:
[soumyajitde@gw02 flume_demo]$ cat example.conf

example.conf: A single-node Flume configuration

Name the components on this agent

a1.sources = r1
a1.sinks = k1
a1.channels = c1

Describe/configure the source

a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

Describe the sink

a1.sinks.k1.type = logger

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

==================================================

I had cross checked the log4j2.xml and it exist under: /usr/hdp/current/flume-server/conf/. Do I need to copy it somewhere else? Under /conf there is no sub folder.

Any help would be indeed appreciated.

Thanks
Soumyajit


#2

Refer the link Flume ERROR StatusLogger No log4j2 configuration file found


#3

Thanks for the prompt response. I tried that but got different error.
flume-ng agent --name a1 --conf-file example.conf --conf /etc/flume/conf

Error Description
2019-02-28 14:52:28,797 main ERROR RollingFileManager (/tmp/flume/flume.log) java.io.FileNotFoundException: /tmp/flume/flume.log (Permission denied)
2019-02-28 14:52:28,802 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory
2019-02-28 14:52:28,804 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException:

And so on…

I am literally stuck here.

Soumyajit


#4

Hello!

I am also getting the same error.
Using the below command:

flume-ng agent --name step1 --conf-file f.config --conf /home/mahua_roy/flume_avro/flume-avro

Getting the below error:

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

Can anyone help please?


#5

Have corrected the --conf parameter as below:

–conf /etc/flume/conf

Now it is working. Thanks.