flume启动agent报错

运行环境 | ubuntu 18.4 | flume 1.8.0

flume 启动agent报错

  • Including Hadoop libraries found via (/opt/hadoop-2.8.5/bin/hadoop) for HDFS access
    Info: Including Hive libraries found via (/opt/hive-1.2.2) for Hive access
  • exec /usr/jdk1.8/bin/java -Xmx20m -Dflume.root.logger=INFO,console
1
2
3
4
5
6
7
8
9
10
11
12
13
antler@antler:/opt/flume-1.8.0$ ./bin/flume-ng agent -c conf/ -f myconf/flume.conf -Dflume.root.logger=INFO,consoleInfo: Including Hadoop libraries found via (/opt/hadoop-2.8.5/bin/hadoop) for HDFS access
Info: Including Hive libraries found via (/opt/hive-1.2.2) for Hive access
+ exec /usr/jdk1.8/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp '/opt/flume-1.8.0/conf:/opt/flume-1.8.0/lib/*:/opt/hadoop-2.8.5/etc/hadoop:/opt/hadoop-2.8.5/share/hadoop/common/lib/*:/opt/hadoop-2.8.5/share/hadoop/common/*:/opt/hadoop-2.8.5/share/hadoop/hdfs:/opt/hadoop-2.8.5/share/hadoop/hdfs/lib/*:/opt/hadoop-2.8.5/share/hadoop/hdfs/*:/opt/hadoop-2.8.5/share/hadoop/yarn/lib/*:/opt/hadoop-2.8.5/share/hadoop/yarn/*:/opt/hadoop-2.8.5/share/hadoop/mapreduce/lib/*:/opt/hadoop-2.8.5/share/hadoop/mapreduce/*:/opt/hadoop-2.8.5/contrib/capacity-scheduler/*.jar:/opt/hive-1.2.2/lib/*' -Djava.library.path=:/opt/hadoop-2.8.5/lib/native org.apache.flume.node.Application -f myconf/flume.conf
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/flume-1.8.0/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hadoop-2.8.5/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2019-04-06 19:58:40,247 (main) [ERROR - org.apache.flume.node.Application.main(Application.java:348)] A fatal error occurred while running. Exception follows.
org.apache.commons.cli.MissingOptionException: Missing required option: n
at org.apache.commons.cli.Parser.checkRequiredOptions(Parser.java:299)
at org.apache.commons.cli.Parser.parse(Parser.java:231)
at org.apache.commons.cli.Parser.parse(Parser.java:85)
at org.apache.flume.node.Application.main(Application.java:263)

问题原因 & 解决方法

  • 命令错误
  • 正确命令: bin/flume-ng agent -n a1 -c conf/ -f myconf/tail-avro.conf -Dflume.root.logger=INFO,console
本文结束感谢您的阅读,本文原创–支持原创
有问题请联系我--strivedeer@163.com