【问题标题】:No output from the FIWARE complex event processing (CEP) engineFIWARE 复杂事件处理 (CEP) 引擎没有输出
【发布时间】:2015-04-04 17:00:08
【问题描述】:

我正在向 FIWARE CEP 发送 REST POST 请求,并且即使在文件中也期待输出。但文件中没有任何内容。

REST POST (Producer) -> CEP -> File Consumer
http://194.28.122.118:8080/ProtonOnWebServer/rest/events
{"Name":"TrafficReport", "volume":"9000"}

Catalina.out

Apr 3, 2015 4:54:19 PM com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
INFO: started event message body reader
Apr 3, 2015 4:54:19 PM com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
INFO: name value: TrafficReport looking for: Name
Apr 3, 2015 4:54:19 PM com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
INFO: finished event message body reader
Apr 3, 2015 4:54:19 PM com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
INFO: starting submitNewEvent
Apr 3, 2015 4:54:19 PM com.ibm.hrl.proton.router.EventRouter routeTimedObject
INFO: routeTimedObject: forwarding event TrafficReport; Name=TrafficReport; Certainty=0.0; Cost=0.0; EventSource=; OccurrenceTime=null; Annotation=; Duration=0.0; volume=100000; EventId=f4aee2d0-2d4b-4c0c-a24f-ae452896fa75; ExpirationTime=null; Chronon=null; DetectionTime=1428072859603;  to consumer...
Apr 3, 2015 4:54:19 PM com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
INFO: events sent to proton runtime...

【问题讨论】:

    标签: complex-event-processing fiware filab


    【解决方案1】:

    原因可能是您指定为 Consumer 的输出文件的路径不存在,或者 tomcat 无权写入该路径或写入您指定的文件。

    查看日志文件 (logs/catalina.out) 并查看是否看到如下警告:

    WARNING: initializeAdapters: failed to initialize adapter Output adapter for consumer: DoSAttackTRConsumer, reason: No such file or directorycode here
    

    我还建议对输出文件路径使用绝对路径而不是相对路径,因为在不同的操作系统中,Tomcat“当前”目录可能不同。

    你不需要创建文件,但你需要创建目录并确保tomcat有权限写入这个目录(或者如果文件存在可以写入这个文件)

    所以这是我的建议:

    1. 停止Tomcat
    2. 删除 catalina.out
    3. 激活tomcat
    4. 在 CEP Web UI 中,将 Consumers 的路径更改为绝对路径,保存项目,将其导出到存储库
    5. 确保您为消费者指定的路径存在,并且该 tomcat 有权写入该目录,如果文件存在,则写入该文件。
    6. 将 CEP 引擎的状态更改为停止
    7. 将 CEP 引擎的状态更改为启动
    8. 发送输入事件

    确保您没有在 catalina.out 中看到上面列出的警告

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-17
      • 2023-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多