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

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

问题描述

我正在IBM Bluemix中尝试物联网服务,并在Coursera上参加正在运行的MOOC .我已经设置了试用帐户并成功注册了一些设备.我正在使用Bluemix中的以下简单Node-RED流来测试Bluemix和我的Raspberry Pi之间的连通性:

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:

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

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:

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

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

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

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

,其中all commands节点如下:

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

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):

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

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.

有什么想法吗?

附带说明(以及可能有用的其他信息):

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

  1. 在Watson IoT Platform仪表板上按刷新",SenseHAT设备似乎已断开连接;刷新整个页面(即从浏览器),它再次显示为已连接
  2. 无论我尝试了什么,我都无法连接上面显示的其他两个设备(b827eb0a0ee8b827eb5f5bbd)-我什至尝试删除并在Bluemix中重新注册它们.
  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...

推荐答案

按照我之前的评论,看来原因可能是网关和设备的混淆.从日志中看,您似乎已更改了网关和设备之间的设备ID的类型,并且在某些情况下,标识为b827eb0a0ee8的设备已连接为网关(在屏幕截图中仅显示为设备),随后由于以下原因而断开了连接:它会尝试未经授权的操作(可能是尝试连接未注册的设备;即,客户端ID混乱).

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).

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

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.

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

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