我已经使用本指南在 Ubuntu 14.04 上安装了 Cygnus ,当我继续通过(正确填写)启动 cygnus 时:
nohup APACHE_FLUME_HOME/bin/cygnus-flume-ng agent --conf APACHE_FLUME_HOME/conf -f APACHE_FLUME_HOME/conf/cygnus.conf -n cygnusagent -Dflume.root.logger=INFO,LOGFILE [-p <mgmt-if-port>] [-t <polling-interval>] &
我得到这个输出:
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -cp '/etc/flume/apache-flume-1.4.0-bin/conf:/etc/flume/apache-flume-1.4.0-bin/lib/*:/etc/flume/apache-flume-1.4.0-bin/plugins.d/cygnus/lib/*'
-Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -f /usr/cygnus/conf/agent_1.conf -n cygnusagent
Starting an ordered shutdown of Cygnus
Stopping sources
All the channels are empty
Stopping channels Stopping sinks
问题出在哪里?
版本:0.8.0
会议。文件:
cygnusagent.channel = mysql-channel
cygnusagent.sinks = mysql-sink
cygnusagent.sources = http-source
cygnusagent.sources.http-source.channels = mysql-channel
cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource
cygnusagent.sources.http-source.port = 5050
cygnusagent.sources.http-source.handler = es.tid.fiware.fiwareconnectors.cygnus.handlers.OrionRestHandler
cygnusagent.sources.http-source.handler.notification_target = /notify
cygnusagent.sources.http-source.handler.default_service = def_serv
cygnusagent.sources.http-source.handler.default_service_path = def_servpath
cygnusagent.sources.http-source.handler.events_ttl = 10
cygnusagent.sources.http-source.interceptors = ts de
cygnusagent.sources.http-source.interceptors.ts.type = timestamp
cygnusagent.sources.http-source.interceptors.de.type = es.tid.fiware.fiwareconnectors.cygnus.interceptors.DestinationExtractor$Builder
cygnusagent.sources.http-source.interceptors.de.matching_table = /usr/cygnus/conf/matching_table.conf
cygnusagent.sinks.mysql-sink.channel = mysql-channel
cygnusagent.sinks.mysql-sink.type = es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionMySQLSink
cygnusagent.sinks.mysql-sink.mysql_host = 127.0.0.1
cygnusagent.sinks.mysql-sink.mysql_port = 3306
cygnusagent.sinks.mysql-sink.mysql_username = root
cygnusagent.sinks.mysql-sink.mysql_password = root
cygnusagent.sinks.mysql-sink.attr_persistence = row
cygnusagent.channels.mysql-channel.type = memory
cygnusagent.channels.mysql-channel.capacity = 1000
cygnusagent.channels.mysql-channel.transactionCapacity = 100
日志:
2015-05-20 18:51:59,475 (main) [INFO - com.telefonica.iot.cygnus.nodes.CygnusApplication.main(CygnusApplication.java:235)] 启动监听端口 8081 的 Jetty 服务器(管理界面)
2015-05-20 18:51:59,519 (main) [INFO - org.mortbay.log.Slf4jLog.info(Slf4jLog.java:67)] 通过登录到 org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) org.mortbay.log.Slf4jLog
2015-05-20 18:51:59,519 (main) [INFO - com.telefonica.iot.cygnus.nodes.CygnusApplication.main(CygnusApplication.java:238)] 启动 Cygnus 应用程序
2015-05-20 18:51:59,528 (Thread-1) [INFO - org.mortbay.log.Slf4jLog.info(Slf4jLog.java:67)] jetty-6.1.26
2015-05-20 18:51:59,544 (lifecycleSupervisor-1-0) [INFO - org.apache.flume.node.PollingPropertiesFileConfigurationProvider.start(PollingPropertiesFileConfigurationProvider.java:61)] 配置提供程序启动
2015-05-20 18:51:59,559 (conf-file-poller-0) [INFO - org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:133)] 重新加载配置文件:/etc/水槽/apache-flume-1.4.0-bin/conf/cygnus.conf
2015-05-20 18:51:59,575 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] 处理:mysql-sink
2015-05-20 18:51:59,588 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] 处理:mysql-sink
2015-05-20 18:51:59,588 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] 处理:mysql-sink
2015-05-20 18:51:59,589 (conf-file-poller-0) [WARN - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1046)] 指定的属性无效:通道
2015-05-20 18:51:59,592 (conf-file-poller-0) [WARN - org.apache.flume.conf.FlumeConfiguration.(FlumeConfiguration.java:101)] 配置属性被忽略:cygnusagent.channel = mysql-渠道
2015-05-20 18:51:59,593 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] 处理:mysql-sink
2015-05-20 18:51:59,593 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:930)] 添加了接收器:mysql-sink Agent : 天鹅座
2015-05-20 18:51:59,594 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] 处理:mysql-sink
2015-05-20 18:51:59,594 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] 处理:mysql-sink
2015-05-20 18:51:59,594 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] 处理:mysql-sink
2015-05-20 18:51:59,621 (conf-file-poller-0) [WARN - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.isValid(FlumeConfiguration.java:319)] 'cygnusagent' 的代理配置不包含任何频道。将其标记为无效。
2015-05-20 18:51:59,621 (conf-file-poller-0) [WARN - org.apache.flume.conf.FlumeConfiguration.validateConfiguration(FlumeConfiguration.java:127)] 代理“cygnusagent”的代理配置无效。它将被删除。
2015-05-20 18:51:59,622 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration.validateConfiguration(FlumeConfiguration.java:140)] 验证后水槽配置包含代理的配置:[]
2015-05-20 18:51:59,622 (conf-file-poller-0) [WARN - org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:138)] 找不到此主机的配置:cygnusagent
2015-05-20 18:51:59,640 (Thread-1) [WARN - org.mortbay.log.Slf4jLog.warn(Slf4jLog.java:76)] 失败 SocketConnector@0.0.0.0:8081: java.net.BindException:地址已被使用
2015-05-20 18:51:59,652 (Thread-1) [WARN - org.mortbay.log.Slf4jLog.warn(Slf4jLog.java:76)] Server@62526d1d: java.net.BindException: 地址已在使用中
2015-05-20 18:51:59,652 (Thread-1) [FATAL - com.telefonica.iot.cygnus.http.JettyServer.run(JettyServer.java:62)] 运行管理界面的致命错误。详细信息=地址已在使用中
2015-05-20 18:51:59,669 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.startAllComponents(Application.java:138)] 开始新配置:{ sourceRunners:{} sinkRunners:{} 频道:{} }
2015-05-20 18:51:59,723 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.stopAllComponents(Application.java:101)] 关闭配置:{ sourceRunners:{} sinkRunners:{} 频道:{} }
2015-05-20 18:51:59,724 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.startAllComponents(Application.java:138)] 开始新配置:{ sourceRunners:{} sinkRunners:{} 频道:{} }