Fiware 猎户座CB:Can';t通过/v2/Entities端点访问实体
在使用Fiware 猎户座CB:Can';t通过/v2/Entities端点访问实体,fiware,fiware-orion,fiware-wirecloud,Fiware,Fiware Orion,Fiware Wirecloud,在使用NGSI Source operator创建wirecloud布线时,我在几天的时间里遇到了一个关于连接到我的Orion CB实例的错误(无助的错误)。我可以确认输入的所有其他NGSI操作员设置均正确 Error creating subscription in the context broker server: Connection Error 然而,我怀疑这个错误与Orion没有找到订阅NGSI源操作符的实体有关。这是因为我尝试访问了Eindhoven的代理()并且成功地创建了NG
NGSI Source operator
创建wirecloud布线时,我在几天的时间里遇到了一个关于连接到我的Orion CB实例的错误(无助的错误)。我可以确认输入的所有其他NGSI操作员设置均正确
Error creating subscription in the context broker server: Connection Error
然而,我怀疑这个错误与Orion没有找到订阅NGSI源操作符的实体有关。这是因为我尝试访问了Eindhoven的代理()并且成功地创建了NGSI源操作符订阅
同样,我使用以下方法获取Eindhoven经纪人中的所有实体/属性:
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
[]
返回空列表,而我有两个可用的固件服务:environment
和urbansense
。我要访问的实体可通过具有/basic
fiware服务路径的urbansense
fiware服务访问
服务卫生:
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"
}
}
问题:
我不确定是否完全理解您的情况(特别是与Wirecloud的关系,因为我不是Wirecloud方面的专家),但让我们试着回答……:) 发件人: [GET/v2/entities]返回空列表,而我有两个可用的固件服务:
environment
和urbansense
。我要访问的实体可通过urbansense fiware服务获得,该服务具有/basic
fiware服务路径
如果要访问的实体在给定服务和子服务中可用,则应将其添加到GET请求中。我不知道http
命令是如何工作的,但是如果它是curl
,它会是这样的
curl -H 'fiware-service: environment' and -H 'fiware-servicepath: /basic' http://212.159.228.70:1026/v2/entities
为了检查我是否正确理解这个案子。。。您正在Orion实例上执行
GET 193.136.xx.xx:53154/v2/entities
,因此它应该将查询转发到Eindhoven的Orion,以便解决查询并将结果返回给您。是吗?我编辑了我的问题,精确地描述了我想要弄明白的东西(也许我最初添加了很多细节,但没有帮助),现在使用curl
now。想了解我的猎户座实例为什么会这样做。不确定编辑是否出错。问题似乎是一样的,我没有看到curl命令…我可以确认你的答案是正确的。现在我可以确认这不是在context broker服务器中创建订阅时出错的原因:对于NGSI Source operator->Orion实例订阅,连接错误。我会继续挖掘以了解课程。