在使用NGSI Source operator
创建Wirecloud接线时,几天来我遇到了与我的Orion CB实例的连接错误(无助错误)。我可以确认输入的所有其他NGSI操作员设置都是正确的。
Error creating subscription in the context broker server: Connection Error
但是,我怀疑此错误与Orion找不到要订阅NGSI Source运算符的实体有关。这是因为我尝试访问Eindhoven的代理(http://212.159.228.70:1026/),并且可以正常工作,成功创建了NGSI Source操作员订阅。
同样,我使用以下方法获得埃因霍温经纪人中的所有实体/属性:
Akil$http http://212.159.228.70:1026/v2/entities
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 15501
Content-Type: application/json
Date: Mon, 13 May 2019 10:20:20 GMT
Fiware-Correlator: b5e5294a-7568-11e9-83c8-0242ac120003
[
{
"NO2": {
"metadata": {},
"type": "Number",
"value": 27.5
},
"Ozon": {
"metadata": {},
"type": "Number",
"value": 59.5
},
"PM1": {
"metadata": {},
"type": "Number",
"value": 8
},
"PM10": {
"metadata": {},
"type": "Number",
"value": 12
},
.
.
}
]
但是随后我无法使用相同的场景在Orion实例中获取实体:
Akil$ http 193.136.xx.xx:53154/v2/entities
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 2
Content-Type: application/json
Date: Mon, 13 May 2019 10:36:13 GMT
Fiware-Correlator: ee22e4b2-756a-11e9-afa1-0242ac160007
[]
返回空列表,而我有2种FIWARE服务:environment
和urbansense
。我要访问的实体可用于具有urbansense
fiware-servicepath的/basic
fiware-service。
服务运行状况:
Akil$ http 193.136.xx.xx:53154/version
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 345
Content-Type: application/json
Date: Mon, 13 May 2019 10:50:13 GMT
Fiware-Correlator: e32bf3da-756c-11e9-9371-0242ac160007
{
"orion": {
"compile_time": "Tue Feb 12 10:51:10 UTC 2019",
"compiled_by": "root",
"compiled_in": "4f8128ac7b5b",
"doc": "https://fiware-orion.rtfd.io/",
"git_hash": "7ae8c69b97cd875236b952322a6bd503debbd13d",
"release_date": "Tue Feb 12 10:51:10 UTC 2019",
"uptime": "6 d, 18 h, 7 m, 6 s",
"version": "2.1.0-next"
}
}
问题:
答案 0 :(得分:1)
我不确定是否完全理解您的情况(特别是与Wirecloud的关系,因为我不是Wirecloud的专家),但让我们尝试回答...:)
发件人:
[GET / v2 / entities]返回空列表,而我有2种FIWARE服务:
environment
和urbansense
。我要访问的实体可用于具有/basic
fiware-servicepath的urbansense fiware-service。
如果要访问的实体在给定服务和子服务中可用,则应将其添加到GET请求中。我不知道http
命令的工作方式,但是如果是curl
,它将是这样的
curl -H 'fiware-service: environment' and -H 'fiware-servicepath: /basic' http://212.159.228.70:1026/v2/entities