天鹅座安装在本地主机上
Cygnus install on localhost
按照本指南进行操作
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
除了这个错误。我使用 service cygnus status 并正确启动。
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.access1(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
Alejandro,这是 Cygnus 0.7.0 的一个众所周知的错误。本周初,一个新的 0.7.1 版本被上传到 FIWARE 仓库。无论如何,所谓的致命错误(这是一个错误,但不是致命的 :))不会影响 Cygnus 的行为,因为它只影响管理界面(目前只有一种方法 returns 你的版本 运行宁)。因此,Cygnus 应该在您为 /usr/cygnus/conf/agent_1.conf
文件中的 HTTPSource
配置的端口中正常工作:
cygnusagent.sources.http-source.port = 5050
在安装新版本之前,我建议您删除以前的版本。我的意思是,不要简单地 运行 yum install cygnus
来更新现有的安装,而是主动 yum remove cygnus
然后 yum install cygnus
。原因是关于 RPM 部署的另一个错误,该错误也在 0.7.1 版中修复。
按照本指南进行操作
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
除了这个错误。我使用 service cygnus status 并正确启动。
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.access1(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
Alejandro,这是 Cygnus 0.7.0 的一个众所周知的错误。本周初,一个新的 0.7.1 版本被上传到 FIWARE 仓库。无论如何,所谓的致命错误(这是一个错误,但不是致命的 :))不会影响 Cygnus 的行为,因为它只影响管理界面(目前只有一种方法 returns 你的版本 运行宁)。因此,Cygnus 应该在您为 /usr/cygnus/conf/agent_1.conf
文件中的 HTTPSource
配置的端口中正常工作:
cygnusagent.sources.http-source.port = 5050
在安装新版本之前,我建议您删除以前的版本。我的意思是,不要简单地 运行 yum install cygnus
来更新现有的安装,而是主动 yum remove cygnus
然后 yum install cygnus
。原因是关于 RPM 部署的另一个错误,该错误也在 0.7.1 版中修复。