1

I installed Flume

and tried to run this command

flume-ng agent -n $agent_name -c conf -f /home/gautham/Downloads/apache-flume-1.5.0.1-bin/conf/flume-conf.properties.template

and I get this exception

ERROR node.Application: A fatal error occurred while running. Exception follows.
org.apache.commons.cli.MissingArgumentException: Missing argument for option: n
    at org.apache.commons.cli.Parser.processArgs(Parser.java:343)
    at org.apache.commons.cli.Parser.processOption(Parser.java:393)
    at org.apache.commons.cli.Parser.parse(Parser.java:199)
    at org.apache.commons.cli.Parser.parse(Parser.java:85)
    at org.apache.flume.node.Application.main(Application.java:252)
4

3 回答 3

1

检查您是否以.conf扩展名命名了您的水槽文件。

并尝试使用以下命令:

$ flume-ng agent \
--conf-file PathOfYourFlumeFile\
--name  agentameInFlumeFile\
--conf $FLUME_HOME/conf \

更改$agent_name为您在水槽文件中使用的代理名称。

您必须提及带有.conf扩展名的水槽文件的路径而不是这个/home/gautham/Downloads/apache-flume-1.5.0.1-bin/conf/flume-conf.properties.template

于 2017-09-12T07:04:39.963 回答
0

而不是 $agent_name 在您的 conf 文件中使用代理的实际名称。

我怀疑您没有 $agent_name 环境变量,因此将其替换为空字符串。

于 2014-10-13T03:06:47.827 回答
0

我有这个类似的问题。后来发现通过再次用连字符替换所有连字符(-),它开始工作。可能当我复制此命令时,连字符被替换为减号(-)。

于 2018-11-05T06:17:27.433 回答