Fiware 在wirecloud mashup中创建NGSI源订阅
我必须承认,我在为wirecloud mashup创建NGSI源订阅时遗漏了一些要点。我尝试了Wirecloud基本历史信息教程,尝试了我自己部署的Orion CB实例,尝试了为曼彻斯特和埃因霍温城市的Orion端点创建订阅,但没有任何实际效果:以下是我针对每个案例所做的尝试:Fiware 在wirecloud mashup中创建NGSI源订阅,fiware,fiware-orion,fiware-wirecloud,Fiware,Fiware Orion,Fiware Wirecloud,我必须承认,我在为wirecloud mashup创建NGSI源订阅时遗漏了一些要点。我尝试了Wirecloud基本历史信息教程,尝试了我自己部署的Orion CB实例,尝试了为曼彻斯特和埃因霍温城市的Orion端点创建订阅,但没有任何实际效果:以下是我针对每个案例所做的尝试: Wirecloud用户指南基础教程(历史信息-按说明创建的设置): NGSI服务器URL: NGSI代理URL: 使用用户的固件凭据:已启用 使用工作区所有者的固件凭据:已禁用 NGSI租户/服务:Emtpy NGSI范
服务器ip 193.136.xx.xx
托管):
NGSI服务器URL:
NGSI代理URL:
固件服务:urbansense
固件服务路径:/basic
NGSI实体类型:
监测的NGSI属性:位置、温度、相对湿度
然后,我还得到以下错误:
Error creating subscription in the context broker server: Connection Error
请问我到底做错了什么
编辑:使用自己的NGSI代理实例: NGSI服务器ULR NGSI代理URL: 固件服务urbansense 固件服务路径/basic NGSI实体类型 监测的NGSI属性位置、温度、相对湿度 然而,错误仍然存在:
Error creating subscription in the context broker server: Connection Error
检查实体/属性的可用性:
$curl -H 'fiware-service: urbansense' -H 'fiware-servicepath: /basic' http://193.136.29.17:53149/v2/entities
[{"id":"001","type":"WeatherObserved","dateObserved":{"type":"Text","value":"2014-06-05T21:47:06+01:00","metadata":{}},"illuminance":{"type":"Number","value":2.80323,"metadata":{}},"location":{"type":"StructuredValue","value":{"coordinates":[-8.594765,41.178296]},"metadata":{}},"name":{"type":"Text","value":"FEUP I322 Shannon","metadata":{}},"relativeHumidity":{"type":"None","value":null,"metadata":{}},"temperature":{"type":"None","value":null,"metadata":{}}},{"id":"003","type":"AirQualityObserved","O3":{"type":"Number","value":2.48661,"metadata":{}},"dateObserved":{"type":"Text","value":"2014-06-05T20:34:06+01:00","metadata":{}},"location":{"type":"StructuredValue","value":{"coordinates":[-8.594765,41.178296]},"metadata":{}},"name":{"type":"Text","value":"FEUP I322 Shannon","metadata":{}},"particles":{"type":"None","value":null,"metadata":{}}},{"id":"002","type":"NoiseLevelObserved","dateObserved":{"type":"Text","value":"2016-05-27T07:28:44+01:00","metadata":{}},"location":{"type":"StructuredValue","value":{"coordinates":[-8.590856,41.162781]},"metadata":{}},"measurand":{"type":"Number","value":67.7,"metadata":{}},"name":{"type":"Text","value":"Testbed Velasquez","metadata":{}},"sonometerClass":{"type":"Number","value":1,"metadata":{}}}]
NGSI代理日志:
$ ngsi-proxy
ngsi-proxy server listening on port 3000
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "OPTIONS /eventsource HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
Created connection with id: b0eb3540-7d49-11e9-8abb-f5559f5e609e
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "POST /eventsource HTTP/1.1" 201 135 "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "OPTIONS /callbacks HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
Created callback with id: b1039f40-7d49-11e9-8abb-f5559f5e609e
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "POST /callbacks HTTP/1.1" 201 131 "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
::ffff:127.0.0.1 - - [23/May/2019:10:58:57 +0000] "OPTIONS /callbacks/b1039f40-7d49-11e9-8abb-f5559f5e609e HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
Deleting callback b1039f40-7d49-11e9-8abb-f5559f5e609e
Deleted callback with id: b1039f40-7d49-11e9-8abb-f5559f5e609e
::ffff:127.0.0.1 - - [23/May/2019:10:58:57 +0000] "DELETE /callbacks/b1039f40-7d49-11e9-8abb-f5559f5e609e HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
NGINX错误日志(NGINX\u日志/error.log
):
只要在所选的上下文代理上,在该租户ID(FIWARE服务)和该服务路径上,存在这样的实体类型,您就不会犯任何错误 但是连接错误不是由于您的上下文代理实例(您自己的实例或FIWARE lab上的公共实例)造成的,而是由于NGSI代理造成的。NGSI proxy()的FIWARE实验室实例似乎工作不正常。在报告和重新授权时,您可以按照以下说明尝试自己的NGSI代理InstanceC: 请记住,NGSI源操作员(我假设您正在使用它)使用NGSI代理接收订阅通知(操作员订阅受监控的NGSI属性的任何更改),并且由于代理工作不正常,订阅失败
致以最诚挚的问候我编辑了我的问题,使用本地
ngsi代理
显示结果,并检查可用的实体/属性,但同样的错误在context broker服务器中创建订阅时出错:连接错误
您能看一下吗?@Alvaroaranz您能为这个问题提供帮助吗?我编辑了我的问题,显示了ngsi代理
和nginx
错误日志中的日志。
$ ngsi-proxy
ngsi-proxy server listening on port 3000
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "OPTIONS /eventsource HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
Created connection with id: b0eb3540-7d49-11e9-8abb-f5559f5e609e
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "POST /eventsource HTTP/1.1" 201 135 "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "OPTIONS /callbacks HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
Created callback with id: b1039f40-7d49-11e9-8abb-f5559f5e609e
::ffff:127.0.0.1 - - [23/May/2019:10:58:26 +0000] "POST /callbacks HTTP/1.1" 201 131 "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
::ffff:127.0.0.1 - - [23/May/2019:10:58:57 +0000] "OPTIONS /callbacks/b1039f40-7d49-11e9-8abb-f5559f5e609e HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
Deleting callback b1039f40-7d49-11e9-8abb-f5559f5e609e
Deleted callback with id: b1039f40-7d49-11e9-8abb-f5559f5e609e
::ffff:127.0.0.1 - - [23/May/2019:10:58:57 +0000] "DELETE /callbacks/b1039f40-7d49-11e9-8abb-f5559f5e609e HTTP/1.1" 204 - "http://193.136.xx.xx:53152/arilwan/urbansense-history-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
2019/05/23 10:57:04 [warn] 6#6: *171 upstream sent more data than specified in "Content-Length" header while reading upstream, client: 193.136.38.232, server: , request: "GET /showcase/media/CoNWeT/map-viewer/2.6.2/index.html?entrypoint=true&v=31cb4ca4c8751f6d04c4242d0b52b176a2c7bc9b&theme=wirecloud.defaulttheme HTTP/1.1", upstream: "http://192.168.224.10:8000/showcase/media/CoNWeT/map-viewer/2.6.2/index.html?entrypoint=true&v=31cb4ca4c8751f6d04c4242d0b52b176a2c7bc9b&theme=wirecloud.defaulttheme", host: "193.136.xx.xx:53152", referrer: "http://193.136.xx.xx:53152/arilwan/urbansense-history-info"
2019/05/23 10:57:34 [error] 6#6: *179 upstream prematurely closed connection while reading response header from upstream, client: 193.136.38.232, server: , request: "POST /cdp/http/193.136.xx.xx:53149/v2/subscriptions HTTP/1.1", upstream: "http://192.168.224.10:8000/cdp/http/193.136.xx.xx:53149/v2/subscriptions", host: "193.136.xx.xx:53152", referrer: "http://193.136.xx.xx:53152/arilwan/urbansense-history-info"