简体   繁体   English

如何解决在上下文代理服务器中创建订阅时出错:连接错误?

[英]How to solve Error creating subscription in the context broker server: Connection Error?

I'm trying to retrieve data from Orion context broker in Wirecloud via NGSI Source Operator. 我正在尝试通过NGSI Source Operator从Wirecloud的Orion上下文代理中检索数据。 I run Orion broker in a VM-Centos. 我在VM-Centos中运行Orion代理。

The NGSI server URL is " http://192.168.2.129:1026 ". NGSI服务器URL是“ http://192.168.2.129:1026 ”。

The NGSI proxy URL is " https://ngsiproxy.lab.fiware.org ". NGSI代理URL为“ https://ngsiproxy.lab.fiware.org ”。

The error "Error creating subscription in the context broker server: Connection Error' . What should i do? Providing that when i write the IP in the browser, that's the result: 错误“在上下文代理服务器中创建订阅时出错:连接错误”。我该怎么办?在浏览器中写入IP时提供了以下结果:

{
"orionError" : 
   {
   "code" : "400",
   "reasonPhrase" : "Bad Request", 
   "details" : "service not found"
   }
}

The url is in the VM of the CB With the IP and port of the CB VM https://postimg.org/image/qgi5rlm1z/ 网址位于CB的VM中,具有CB VM的IP和端口https://postimg.org/image/qgi5rlm1z/

The Error: "Error creating subscription in the context broker server: Connection Error” appears in the wiring on the wirecloud The overall idea is that I have created entities successfully, I can register, update, sub and query But I need to see these results on the wirecloud..so I need to retrieve the data from the VM to the wirecloud to be visible on the NSGI browser Widget. Wirecloud上的连线中出现错误:“在上下文代理服务器中创建订阅时出错:连接错误”总体思路是,我已经成功创建了实体,可以注册,更新,订阅和查询,但是我需要查看这些结果在wirecloud..so上,我需要从VM到wirecloud检索数据,以便在NSGI浏览器小部件上可见。

When I make the NSGI proxy setting to : https://ngsiproxy.lab.fiware.org → "Error creating subscription in the context broker server: Connection Error” https://s31.postimg.org/q50pe9d5n/image.png 当我将NSGI代理设置设置为: https ://ngsiproxy.lab.fiware.org→“在上下文代理服务器中创建订阅时出错:连接错误” https://s31.postimg.org/q50pe9d5n/image.png

When I change it to : https://mashup.lab.fiware.org:8443 → This appears https://s31.postimg.org/4ilox86vf/image.png 当我将其更改为: https : //mashup.lab.fiware.org : 8443 →出现https://s31.postimg.org/4ilox86vf/image.png

Wiring : https://s31.postimg.org/od7qjced7/image.png 接线: https : //s31.postimg.org/od7qjced7/image.png

if you just type in the browser 如果您只是在浏览器中输入

http://192.168.2.129:1026 you will get the error you describe as no Orion service is invoked. http://192.168.2.129:1026您将得到描述为未调用Orion服务的错误。

If you want to create a subscription you would need to do it directly to the Broker without passing through the NGSI Proxy. 如果要创建订阅,则需要直接对代理进行订阅,而无需通过NGSI代理。 So you would need to 所以你需要

POST http://192.168.2.129:1026/v2/subscriptions using a payload similar to the one described at 使用类似于以下内容中所述的有效载荷发布POST http://192.168.2.129:1026/v2/订阅

http://fiware-orion.readthedocs.io/en/master/user/walkthrough_apiv2/index.html#subscriptions http://fiware-orion.readthedocs.io/en/master/user/walkthrough_apiv2/index.html#subscriptions

I Hope this helps 我希望这有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM