本文介绍了Perseo前端在日志中显示此错误:msg =缺少子服务标头msg =缺少服务标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用perseo cep为其设置了一条规则.我在Perseo fron End的日志中收到此消息: http://perseo-core:8080/perseo-core/rules 返回{"code":200,"body":{}}.然后,当我修改属性时,在Perseo Core的日志中,我看到以下消息:msg = Firing Rule:MapEventBean.到目前为止,还算不错,但是在Perseo FE的日志中又收到了一条消息:msg =缺少子服务标头msg =缺少服务标头,并且它没有更新我的实体.

Using perseo cep, I set a rule to it. I get this message in the Perseo fron End's Log: http://perseo-core:8080/perseo-core/rules returns {"code":200,"body":{}}. Then when I modify an attribute, in the Perseo Core's Log I see this message: msg=Firing Rule: MapEventBean. So far, so good, but then again in the Perseo FE's log I get the message: msg=missing subservice header msg=missing service header, and it is not updating my entity.

这是日志:时间= 2019-05-11T14:30:48.774Z |lvl = INFO |corr = n/a |trans = n/a |op = checkRequest |comp = perseo-fe |srv = n/a |subsrv = n/a |msg =缺少子服务标头时间= 2019-05-11T14:30:48.774Z |lvl = INFO |corr = n/a |trans = n/a |op = checkRequest |comp = perseo-fe |srv = n/a |subsrv = n/a |msg =缺少服务标头时间= 2019-05-11T14:30:48.774Z |lvl = INFO |corr = 5229c32c-362a-43f6-acda-11d6d8198261;perseocep = 21 |trans = 5229c32c-362a-43f6-acda-11d6d8198261 |op =/version |path =/version |comp = perseo-fe |srv = unknownt |subsrv =/|from = :: 1 |msg =传入请求{方法":"GET","url":"/版本",标头":{主机":"localhost:9090",用户代理":"curl/7.52.1","accept":"/"},"body":{},"subservice":"/","service":"unknownt"}时间= 2019-05-11T14:30:48.774Z |lvl = INFO |corr = 5229c32c-362a-43f6-acda-11d6d8198261;perseocep = 21 |trans = 5229c32c-362a-43f6-acda-11d6d8198261 |op =/version |path =/version |comp = perseo-fe |srv = unknownt |subsrv =/|from = :: 1 |msg =发送

This is the log:time=2019-05-11T14:30:48.774Z | lvl=INFO | corr=n/a | trans=n/a | op=checkRequest | comp=perseo-fe | srv=n/a | subsrv=n/a | msg=missing subservice headertime=2019-05-11T14:30:48.774Z | lvl=INFO | corr=n/a | trans=n/a | op=checkRequest | comp=perseo-fe | srv=n/a | subsrv=n/a | msg=missing service headertime=2019-05-11T14:30:48.774Z | lvl=INFO | corr=5229c32c-362a-43f6-acda-11d6d8198261; perseocep=21 | trans=5229c32c-362a-43f6-acda-11d6d8198261 | op=/version | path=/version | comp=perseo-fe | srv=unknownt | subsrv=/ | from=::1 | msg=incoming request {"method":"GET","url":"/version","headers":{"host":"localhost:9090","user-agent":"curl/7.52.1","accept":"/"},"body":{},"subservice":"/","service":"unknownt"}time=2019-05-11T14:30:48.774Z | lvl=INFO | corr=5229c32c-362a-43f6-acda-11d6d8198261; perseocep=21 | trans=5229c32c-362a-43f6-acda-11d6d8198261 | op=/version | path=/version | comp=perseo-fe | srv=unknownt | subsrv=/ | from=::1 | msg=sending

Mi Rule:

{"name":"pruebaUpdate","text":从模式[每个ev = iotEvent(cast(cast(cast(temperature?,String),float)>> 45)andtype = \"AirQualityObserved \")],行动": [{"type":更新",参数": {"id":"$ {id}","type":观察到的空气质量","version":"2",属性":[{"name":异常","type":"boolean","value":"true"}]}}]}

{ "name": "pruebaUpdate", "text": "select ev.temperature? as temperature, ev.id? as id, \"pruebaUpdate\" as ruleName from pattern [every ev=iotEvent(cast(cast(temperature?,String),float) > 45 and type=\"AirQualityObserved\")]", "action": [{ "type": "update", "parameters": { "id":"${id}", "type":"AirQualityObserved", "version": "2", "attributes":[ { "name": "abnormal", "type": "boolean", "value": "true" } ] } }]}

我想在另一个属性高于某个值时更新一个属性,该属性存在于某些实体中,但不在同一类型的其他实体中.我不会更新该属性.

I want to update one attribute when other attribute is higher than a value, that attribute is in some entities but not in other of the same type. I am not getting to update that attribute.

推荐答案

将规则放在正确的位置,我没有收到缺少服务子服务"的错误.我向 http://perseo-fe-ip:9090/rules 注册了规则,解决了问题.

Placing the rule in the correct place I didn't get the error of "missing service subservice". I registered the rule with http://perseo-fe-ip:9090/rules and I fixed the problems.

这篇关于Perseo前端在日志中显示此错误:msg =缺少子服务标头msg =缺少服务标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 14:54