mosquitto 和 ibm watson iot on raspberry pi Connection Refused

忍者

我是物联网的新手。我刚刚在我的 rpi 上安装了 mosquitto,并使用本教程在 Watson IoT Platform 中注册了我的设备和网关:https : //developer.ibm.com/recipes/tutorials/using-mosquitto-as-a-gateway-for-watson-iot /

Mosquitto 在本地模式下工作正常。但是,我在使用以下命令订阅/发布时遇到了问题:

 mosquitto_sub -d -h pxci52.messaging.internetofthings.ibmcloud.com  -i 'g:pxci52:myfstream:gateway' -t iot-2/type/myfstream/id/gateway/evt/status/fmt/raw

sudo mosquitto_pub -d -h pxci52.messaging.internetofthings.ibmcloud.com  -i 'g:pxci52:myfstream:gateway' -t iot-2/type/myfstream/id/gateway/evt/status/fmt/raw -m "hello"

这是我的 conf 文件:

pid_file /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest topic


log_type error
log_type warning
log_type notice
log_type information

connection_messages true
log_timestamp true

include_dir /etc/mosquitto/conf.d
connection bridge-to-watsoniot
address pxci52.messaging.internetofthings.ibmcloud.com:1883
cleansession true
try_private false
bridge_attempt_unsubscribe false
notifications false
notification_topic iot-2/type/myfstream/id/gateway/evt/status/fmt/raw
remote_username token
remote_password xxxxxx
remote_clientid g:pxci52:myfstream:gateway
notifications true
topic iot-2/type/+/id/+/cmd/+/fmt/+ in iot-2/type/+/id/+/cmd/+/fmt/+
topic iot-2/type/+/id/+/evt/+/fmt/+ out iot-2/type/+/id/+/evt/+/fmt/+
connection_messages true

瓦莱丽兰普金

我在日志中看到设备身份验证的无效用户 ID(令牌):ClientID='g:pqci52:myfstream:gateway' 而不仅仅是“令牌”尝试“use-token-auth”这就是您在配方示例中指定的内容下列的。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

IBM IoT Raspberry Pi连接被拒绝未授权

使用Mosquitto尝试使用Watson Iot平台服务

React Native 和 IBM Watson

QEMU和Raspberry Pi

Google IOT Core和Raspberry Pi:错误:拒绝连接:用户名或密码错误

Raspberry Pi2 Windows 10 IOT核心和Visual Basic 2015

运行 Win10 IoT 的 Raspberry Pi 可以同时使用 Wifi 和蓝牙通信吗?

IoT Raspberry Pi传感器标签

Raspberry Pi,Grove,Windows IoT,C#

如何使用 CC3220s 启动板和 Code Composer Studio 订阅 IBM Watson IOT Platform?

Bluemix上是否有针对Watson IBM IoT服务的CLI?

带有Raspberry Pi和Bluemix的IoT Python应用程序:无法使用按钮打开/关闭灯和发送消息

使用 Raspberry Pi 和 kubernettes

如何在 UWP 项目中通过 I2C 连接到 Arduino 的 Raspberry Pi IoT 打开和关闭 LED?

Windows IoT 通过 Raspberry Pi 3 的启动问题

Raspberry Pi上的Windows IOT Python / UWP交互

为什么我不能在Raspberry Pi上使用python-mosquitto?

Mosquitto 2.0 配置仍然無法在 Raspberry Pi 上運行

在获胜10时使用websockets(Paho客户端)将Mosquitto ERR_CONNECTION_REFUSED

IoT 使用 Google Cloud Service IoT 解决方案 (Weave):如何连接 Raspberry Pi 并点亮 LED?

Raspberry PI 3、SerialPort 和奇怪的响应

代码调试,Raspberry pi中继和if语句

如何在 IBM Watson IoT 上将 node-red-dashboard 安装到 Node-RED?

无法使用JavaScript的Eclipse PAHO MQTT库连接到IBM Watson IoT Platform

IBM Watson IoT-使用ESP8266无法从主题获得带有参数的响应

IBM Watson IoT Platform - 如何创建应用程序接口?

我无法在 IBM Watson IOT 中使用 ESP8266-ESP32 订阅

Node.js-结合IBM Watson发现和对话服务

用于发布和订阅主题的IBM IOT代码