启动flume报WARN:No appenders could be found for logger(org.apache.flume.lifecycle.LifecycleSupervisor)

flume安装完后,在bin目录下执行以下启动命令:

[root@slave1 bin]# ./flume-ng agent --conf conf --conf-file ../conf/pull.conf --name a2 -Dflume.root.logger=INFO,console

结果报出以下WARN,然后界面一直就卡主:

Info: Including Hive libraries found via () for Hive access
+ exec /usr/local/src/java/jdk1.8.0_172/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp 'conf:/usr/local/src/flume/apache-flume-1.6.0-bin/lib/*:/lib/*' -Djava.library.path= org.apache.flume.node.Application --conf-file ../conf/pull.conf --name a2
log4j:WARN No appenders could be found for logger (org.apache.flume.lifecycle.LifecycleSupervisor).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

分析WARN信息,发现conf的值是/usr/local/src/flume/apache-flume-1.6.0-bin/lib/*,而原本应是apache-flume-1.6.0-bin/conf目录,所以尝试着把启动命令中–conf指定为conf目录所在的路径,修改后的启动命令如下:

[root@slave1 bin]# ./flume-ng agent --conf ../conf --conf-file ../conf/pull.conf --name a2 -Dflume.root.logger=INFO,console

结果是正常启动

你可能感兴趣的:(flume)