Cygnus安装在localhost上

时间:2015-03-11 16:44:33

标签: connector fiware fiware-cygnus

遵循本指南

https://github.com/telefonicaid/fiware-connectors/blob/master/flume/doc/quick_start_guide.md

我尝试使用

/usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_1.conf -n cygnusagent -Dflume.root.logger=INFO,console

但是我收到了这个错误

time=2015-03-11T17:35:01.965CET | lvl=WARN | trans= | function=warn | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[76] : failed SocketConnector@0.0.0.0:8081: java.net.BindException: Address already in use
time=2015-03-11T17:35:01.965CET | lvl=WARN | trans= | function=warn | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[76] : failed Server@57c59fac: java.net.BindException: Address already in use
time=2015-03-11T17:35:01.965CET | lvl=FATAL | trans= | function=run | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.http.JettyServer[63] : Fatal error running the Management Interface. Details=Address already in use

除了这个错误。我使用服务天鹅状态并正确启动。

    time=2015-03-11T17:46:52.337CET | lvl=ERROR | trans= | function=run | comp=Cygnus | msg=org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable[253] : Unable to start EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTTPSource{name:http-source,state:IDLE} } - Exception follows.
java.lang.IllegalStateException: Running HTTP Server found in source: http-source before I started one.Will not attempt to start.
    at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
    at org.apache.flume.source.http.HTTPSource.start(HTTPSource.java:137)
    at org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:44)
    at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)

我将端口更改为8085 8084 8083 ...看到他读了conf并忽略了这个conf ...

[root@alex alex]# /usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf -f /usr/cygnus/conf/cygnus_instance_1.conf -n cygnusagent -Dflume.root.logger=INFO,console [-p 8085]
+ exec /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.34.x86_64//bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication -f /usr/cygnus/conf/cygnus_instance_1.conf -n cygnusagent '[-p' '8085]'
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-0.7.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
time=2015-03-11T19:47:50.882CET | lvl=INFO | trans= | function=start | comp=Cygnus | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider[61] : Configuration provider starting
time=2015-03-11T19:47:50.895CET | lvl=INFO | trans= | function=run | comp=Cygnus | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[133] : Reloading configuration file:/usr/cygnus/conf/cygnus_instance_1.conf
time=2015-03-11T19:47:50.906CET | lvl=WARN | trans= | function=<init> | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[101] : Configuration property ignored: CONFIG_FILE = /usr/cygnus/conf/agent_1.conf
time=2015-03-11T19:47:50.907CET | lvl=WARN | trans= | function=<init> | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[101] : Configuration property ignored: CONFIG_FOLDER = /usr/cygnus/conf
time=2015-03-11T19:47:50.907CET | lvl=WARN | trans= | function=<init> | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[101] : Configuration property ignored: AGENT_NAME = cygnusagent
time=2015-03-11T19:47:50.907CET | lvl=WARN | trans= | function=<init> | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[101] : Configuration property ignored: CYGNUS_USER = root
time=2015-03-11T19:47:50.907CET | lvl=WARN | trans= | function=<init> | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[101] : Configuration property ignored: LOGFILE_NAME = cygnus.log
time=2015-03-11T19:47:50.907CET | lvl=WARN | trans= | function=<init> | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[101] : Configuration property ignored: ADMIN_PORT = 8085
time=2015-03-11T19:47:50.907CET | lvl=INFO | trans= | function=validateConfiguration | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: []
time=2015-03-11T19:47:50.908CET | lvl=WARN | trans= | function=getConfiguration | comp=Cygnus | msg=org.apache.flume.node.AbstractConfigurationProvider[138] : No configuration found for this host:cygnusagent
time=2015-03-11T19:47:50.913CET | lvl=INFO | trans= | function=startAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[138] : Starting new configuration:{ sourceRunners:{} sinkRunners:{} channels:{} }
time=2015-03-11T19:47:50.925CET | lvl=INFO | trans= | function=startManagementInterface | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication[85] : Starting a Jetty server listening on port 8081 (Management Interface)
time=2015-03-11T19:47:50.942CET | lvl=INFO | trans= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
time=2015-03-11T19:47:50.942CET | lvl=INFO | trans= | function=stopAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[101] : Shutting down configuration: { sourceRunners:{} sinkRunners:{} channels:{} }
time=2015-03-11T19:47:50.942CET | lvl=INFO | trans= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : jetty-6.1.26
time=2015-03-11T19:47:50.942CET | lvl=INFO | trans= | function=startAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[138] : Starting new configuration:{ sourceRunners:{} sinkRunners:{} channels:{} }
time=2015-03-11T19:47:50.949CET | lvl=INFO | trans= | function=startManagementInterface | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication[85] : Starting a Jetty server listening on port 8081 (Management Interface)
time=2015-03-11T19:47:50.958CET | lvl=INFO | trans= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : jetty-6.1.26
time=2015-03-11T19:47:50.978CET | lvl=WARN | trans= | function=warn | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[76] : failed SocketConnector@0.0.0.0:8081: java.net.SocketException: Address already in use
time=2015-03-11T19:47:50.980CET | lvl=INFO | trans= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : Started SocketConnector@0.0.0.0:8081
time=2015-03-11T19:47:50.982CET | lvl=WARN | trans= | function=warn | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[76] : failed Server@6e811049: java.net.SocketException: Address already in use
time=2015-03-11T19:47:50.982CET | lvl=FATAL | trans= | function=run | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.http.JettyServer[63] : Fatal error running the Management Interface. Details=Address already in use

1 个答案:

答案 0 :(得分:0)

Alejandro,这是Cygnus 0.7.0的一个众所周知的错误。本周初将一个新的0.7.1版本上传到FIWARE回购。无论如何,那个假定的FATAL错误(这是一个错误,但不是FATAL :))不会影响Cygnus的行为,因为它只会影响管理接口(目前只有一个方法可以返回您正在运行的版本)。因此,Cygnus应该在您为HTTPSource文件/usr/cygnus/conf/agent_1.conf配置的端口中正常工作:

cygnusagent.sources.http-source.port = 5050

在安装新版本之前,我建议您删除上一个版本。我的意思是,不要只是运行yum install cygnus来更新现有的installacion,而是主动yum remove cygnus然后yum install cygnus。原因是另一个与0.7.1版本修复的RPM部署有关的错误。