Orion CB:无法通过 /v2/entities 端点访问实体
Orion CB: Can't Access Entities via /v2/entities endpoint
在使用 NGSI Source operator
创建 wirecloud 布线时,我遇到了关于连接到我的 Orion CB 实例的错误(无助的错误)了几天。我可以确认输入的所有其他 NGSI 操作员设置都是正确的。
Error creating subscription in the context broker server: Connection Error
但是,我怀疑此错误与 Orion 未找到订阅 NGSI 源操作员的实体有关。这是因为我尝试访问埃因霍温的经纪人 (http://212.159.228.70:1026/) 并且它有效,成功创建了 NGSI 源操作员订阅。
同样,我在埃因霍温的经纪人中得到所有 entities/attributes 使用:
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
[]
Return 空列表,而我有两个可用的 FIWARE 服务:environment
和 urbansense
。我想要访问的实体可用于具有 /basic
fiware-servicepath 的 urbansense
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"
}
}
问题:
- 为什么我不能像访问 Eindhoven 一样访问我的 Orion 实例
经纪人?
- 这是我为 NGSI Source operator 接线的原因吗
失败,因此报告上面的订阅错误?
我不确定是否完全理解您的情况(特别是与 Wirecloud 的关系,因为我不是 Wirecloud 方面的专家),但让我们试着回答一下...:)
发件人:
[GET /v2/entities] Return empty list, whereas I have available 2 FIWARE services: environment
and urbansense
. The entities I want to access are available with the urbansense fiware-service having /basic
fiware-servicepath.
如果您要访问的实体在给定的服务和子服务中可用,那么您应该将 then 添加到 GET 请求中。我不知道 http
命令是如何工作的,但如果它是 curl
它会像这样
curl -H 'fiware-service: environment' and -H 'fiware-servicepath: /basic' http://212.159.228.70:1026/v2/entities
在使用 NGSI Source operator
创建 wirecloud 布线时,我遇到了关于连接到我的 Orion CB 实例的错误(无助的错误)了几天。我可以确认输入的所有其他 NGSI 操作员设置都是正确的。
Error creating subscription in the context broker server: Connection Error
但是,我怀疑此错误与 Orion 未找到订阅 NGSI 源操作员的实体有关。这是因为我尝试访问埃因霍温的经纪人 (http://212.159.228.70:1026/) 并且它有效,成功创建了 NGSI 源操作员订阅。
同样,我在埃因霍温的经纪人中得到所有 entities/attributes 使用:
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
[]
Return 空列表,而我有两个可用的 FIWARE 服务:environment
和 urbansense
。我想要访问的实体可用于具有 /basic
fiware-servicepath 的 urbansense
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"
}
}
问题:
- 为什么我不能像访问 Eindhoven 一样访问我的 Orion 实例 经纪人?
- 这是我为 NGSI Source operator 接线的原因吗 失败,因此报告上面的订阅错误?
我不确定是否完全理解您的情况(特别是与 Wirecloud 的关系,因为我不是 Wirecloud 方面的专家),但让我们试着回答一下...:)
发件人:
[GET /v2/entities] Return empty list, whereas I have available 2 FIWARE services:
environment
andurbansense
. The entities I want to access are available with the urbansense fiware-service having/basic
fiware-servicepath.
如果您要访问的实体在给定的服务和子服务中可用,那么您应该将 then 添加到 GET 请求中。我不知道 http
命令是如何工作的,但如果它是 curl
它会像这样
curl -H 'fiware-service: environment' and -H 'fiware-servicepath: /basic' http://212.159.228.70:1026/v2/entities