我正在尝试使用带有客户端证书和令牌的 TLS 将 Raspberry Pi 连接到 Watson IoT Platform,并在遵循本教程之后:
我有这个问题:
[BaseClient:connect] Connecting to IoTF with host : ssl://XXXXX.messaging.internetofthings.ibmcloud.com:8883
[BaseClient:onError] Connection Error :: Error: Connection refused: Not authorized
Error: Connection refused: Not authorized
at MqttClient._handleConnack (/home/pi/node_test_watson/iot-nodejs/node_modules/mqtt/lib/client.js:673:9)
at MqttClient._handlePacket (/home/pi/node_test_watson/iot-nodejs/node_modules/mqtt/lib/client.js:274:12)
at process (/home/pi/node_test_watson/iot-nodejs/node_modules/mqtt/lib/client.js:218:12)
at Writable.writable._write (/home/pi/node_test_watson/iot-nodejs/node_modules/mqtt/lib/client.js:228:5)
at doWrite (/home/pi/node_test_watson/iot-nodejs/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/home/pi/node_test_watson/iot-nodejs/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at Writable.write (/home/pi/node_test_watson/iot-nodejs/node_modules/readable-stream/lib/_stream_writable.js:194:11)
at TLSSocket.ondata (_stream_readable.js:555:20)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TLSSocket.Readable.push (_stream_readable.js:134:10)
at TLSWrap.onread (net.js:548:20)
[BaseClient:connect] Iotfclient is offline. Retrying connection
[BaseClient:connect] Retry in 3 sec. Count : 1
[BaseClient:onClose] Connection was closed.
Disconnected from IoTF
我该怎么办?