错误内容如下:
[root@esslog-shqs-4 conf]# flume-ng agent --conf conf --conf-file flume.conf --name a1 -Dflume.root.logger=INFO,console
Info: Including Hive libraries found via () for Hive access
+ exec /service/storm/jdk1.8.0_111/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp 'conf:/service/storm/flume/lib/*:/lib/*' -Djava.library.path= org.apache.flume.node.Application --conf-file flume.conf --name a1
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.
原因:
flume-ng agent --conf conf --conf-file flume.conf --name a1 -Dflume.root.logger=INFO,console
上面命令在使用参数–conf中没有指定绝对路径。
解决方法,改成下面命令:
flume-ng agent --conf /service/storm/flume/conf --conf-file flume.conf --name a1 -Dflume.root.logger=INFO,console