Start flume agent and the solution of “a fatal error occurred while running” appears

The following error occurred when the log console was started after the installation of FluME

2020-11-13 18:10:23,564 ERROR [main] node.Application: A fatal error occurred while running. Exception follows.
java.lang.NullPointerException
	at java.io.File.<init>(File.java:277)
	at org.apache.flume.node.Application.main(Application.java:299)

I was also confused at that time. The steps were executed according to the tutorial in the book, including configuration and commands. I also checked that there was no problem

a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = avro
a1.sources.r1.channels = c1
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 4141
# 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

(its path is/usr/local/flume/conf/avro. Conf, configuration file path to clear, need to use in the solution)
The command I used before is

/usr/local/flume/bin/flume-ng agent -c . -f /usr/local/flume/conf/avro.conf -n a1 -Dflume.root.logger=INFO,console

When the error occurs, search the web for a solution and find it on StackOverflow, changing the command

flume-ng agent --conf /usr/local/flume/conf --conf-file /usr/local/flume/conf/avro.conf --name a1 -Dflume.root.logger=INFO,console

Type this command to start again and resolve.


Read More: