cdh5无法启动flume代理

hrysbysz  于 2021-06-04  发布在  Flume
关注(0)|答案(1)|浏览(585)

我尝试在安装了cdh5的aws ec2机器(redhat)上启动flume代理。我使用命令:

sudo /etc/init.d/flume-ng-agent status

我得到的答复是:

-bash: /etc/init.d/flume-ng-agent: No such file or directory

我查过cdh5指南,上面说这是启动代理的方法。。。我做错了什么?
当我运行flume ng版本时

Flume 1.6.0-cdh5.9.0

编辑:运行命令时 sudo service flume-ng-agent stop 比上面说的要多 Failed to stop flume-ng-agent.service: Unit flume-ng-agent.service not loaded. 如果我跑了 flume-ng help I get ```
Usage: /opt/cloudera/parcels/CDH-5.9.0-1.cdh5.9.0.p0.23/bin/../lib/flume-ng/bin/flume-ng [options]...

如果我运行flume ng代理,就会出现致命错误。。。

ERROR node.Application: 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:265)

编辑2:
使用命令时出现以下错误:

flume-ng agent -c /etc/flume/conf -f /etc/flume/conf/flume.conf -n

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:265)

8ulbf1ek

8ulbf1ek1#

在“-n”之后,必须指定要从配置文件运行的代理的名称。
如果你看https://flume.apache.org/flumeuserguide.html#a-举个简单的例子,你可以看到有一个代理( a1 )在配置文件中定义,并且 --name a1 在命令行示例中。

相关问题