设备已连接,但“IBMIoT:错误:连接被拒绝:未授权"消息不断弹出 [英] Device connected, but 'IBMIoT: Error: Connection refused: Not authorized' message keeps popping up

查看:131
本文介绍了设备已连接,但“IBMIoT:错误:连接被拒绝:未授权"消息不断弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 IBM Bluemix 中试验 IoT 服务,参加了

其中normalalert是各自字符串的简单注入节点,format message节点同样简单(返回msg,其中msg.payload = {'a' : {'indicator' : msg.payload}};IBM IoT节点如下:

从 Watson IoT Platform 仪表板可以看出,senseHAT 设备已注册并成功连接到 Bluemix:

在 Raspberry 方面,我设置了以下简单的流程来捕获 Bluemix 中发出的命令"(normalalert):

all commands 节点如下:

现在,虽然命令"normalalert 从 Bluemix 传递到我的 Raspberry,但我不断收到主题错误消息,如下所示(注意时间戳):

并且在 Node-RED 控制台中记录了类似的错误消息(每分钟一次):

连接错误::错误:连接被拒绝:未授权6 月 9 日 19:41:19 - [错误] IBMIoT:错误:连接被拒绝:未授权Iotfclient 离线.重试连接连接已关闭.

我想知道怎么可能,一方面让命令"通过,另一方面每分钟收到错误消息,声称由于我的设备未经授权而未连接.

>

有什么想法吗?

附注(以及可能有用的附加信息):

  1. 在 Watson IoT Platform 仪表板中按刷新", senseHAT 设备似乎已断开连接;刷新整个页面(即从浏览器),它再次出现连接
  2. 无论我尝试过什么,我都无法连接上面显示的其他两个设备(b827eb0a0ee8b827eb5f5bbd) - 我什至尝试在Bluemix...

解决方案

根据我之前的评论,这看起来可能是网关和设备的混淆.从日志来看,您似乎更改了网关和设备之间的设备 ID 类型,在某些情况下,ID 为 b827eb0a0ee8 的设备已作为网关连接(在屏幕截图中仅显示为设备),随后断开连接,因为它尝试进行未经授权的操作(可能尝试连接未注册的设备;即客户端 ID 混淆问题).

暂时禁用设备的自动注册,因此如果设备不存在(因为客户端 ID 错误),则网关设备将断开连接.

I am experimenting with IoT services in IBM Bluemix, attending a running MOOC at Coursera. I have set up my trial account and successfully registered some devices. I am testing the connectivity between Bluemix and my Raspberry Pi with the following simple Node-RED flow in Bluemix:

where normal and alert are simple injection nodes of the respective strings, the format message node is similarly simple (returns msg, where msg.payload = {'a' : {'indicator' : msg.payload}};, and the IBM IoT node is as follows:

The senseHAT device is registered and successfully connected to Bluemix, as apparent from the Watson IoT Platform dashboard:

From the Raspberry side, I have set the following simple flow to catch the 'commands' (normal and alert) issued in Bluemix:

with the all commands node being as follows:

Now, although the 'commands' normal and alert pass through from Bluemix to my Raspberry, I keep on getting the subject error message, as shown below (notice the time stamps):

and a similar error message is logged in the Node-RED console (once per minute):

Connection Error :: Error: Connection refused: Not authorized
9 Jun 19:41:19 - [error] IBMIoT: Error: Connection refused: Not authorized
Iotfclient is offline. Retrying connection
Connection was closed.

I wonder how it is possible, on the one hand to have the 'commands' passed through, while on the other hand to get at error message per minute claiming that I am not connected since my device is not authorized.

Any ideas?

On a side note (and as possibly useful additional info):

  1. pressing 'Refresh' in the Watson IoT Platform dashboard, the senseHAT device appears disconnected; refreshing the whole page (ie from the browser), it appears again connected
  2. no matter what I have tried, I cannot connect the other two devices shown above (b827eb0a0ee8 and b827eb5f5bbd) - I even tried deleting and re-registering them again in Bluemix...

解决方案

It looks like the cause of this could be the mix up of gateways and devices as per my previous comment. From the logs it looks like you have changed the types of the device IDs between gateway and device, and in some cases a device with id b827eb0a0ee8 has connected as a gateway (shown as just a device in your screen shot) and subsequently been disconnected because it attempts something unauthorised (probably attempting to connect an unregistered device; ie the client ID mix up issue).

Auto registration of devices is temporarily disabled and so if a device does not exist (because the client ID is wrong) then the gateway device will be disconnected.

这篇关于设备已连接,但“IBMIoT:错误:连接被拒绝:未授权"消息不断弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆