CDH5无法启动Flume代理

时间:2016-10-30 10:55:15

标签: twitter cloudera flume

我尝试在安装了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 <command> [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)

EDIT2:

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

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)

1 个答案:

答案 0 :(得分:0)

在“-n”之后,您必须从配置文件中指定要运行的代理的名称。

如果查看https://flume.apache.org/FlumeUserGuide.html#a-simple-example,可以看到配置文件中定义了一个代理(a1),命令行示例中有--name a1