与mostoto MQTT连接到Azure IoT Hub的麻烦 [英] Trouble with mosquitto MQTT connection to Azure IoT Hub

查看:127
本文介绍了与mostoto MQTT连接到Azure IoT Hub的麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,



我正在尝试将mosquitto mqtt代理连接到Azure IoT Hub。但是,我无法连接到IoT中心。  


我尝试了三种不同的方法来验证Azure IoT中心


1)共享访问签名


使用此选项,我可以使用moquitto_pub / sub.exe将mosquitto连接到Azure IoT Hub,但不使用运行配置文件作为服务的mosquitto。


2)CA-Signed


使用此选项,我创建了自我签名的CA作为Azure IoT Hub的根CA,并将其注册到Azure IoT Hub。创建了使用根CA证书签名的客户端证书。


但是无法通过moquitto_pub / sub.exe连接和使用配置文件作为服务运行的mosquitto连接。


从错误消息中,  "证书验证失败"似乎IoT Hub试图进行持有证明检查。


使用与IoT-Hub-SDK相同的证书可以正常工作。


3)自签名,


使用此选项,我没有root ca,但是自生成的证书用于设备。


但是无法通过moquitto_pub / sub.exe和mosquitto连接作为服务运行配置文件。



在这方面可以帮助我吗?



问候,


Arpit Panchal




解决方案

你好Arpit,


你有没有咨询过这个文件? / p>

https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support#using-the-mqtt-protocol-directly


谢谢!


Hi Team,

I am trying to connect the mosquitto mqtt broker with Azure IoT Hub. However, I cannot connect to the IoT Hub.  

I did try three different method for authentication to Azure IoT Hub

1) Shared Access Signature

With this option, I can connect the mosquitto to Azure IoT Hub using its moquitto_pub/sub.exe, but not using the mosquitto running as service with config file.

2) CA-Signed

With this option, I had created self-singed CA as Root CA for Azure IoT Hub, registered it to Azure IoT Hub. Created the client certificate signed with Root CA certificate.

But this fails to connect via moquitto_pub/sub.exe and mosquitto running as service with config file.

From the error message,  "certificate verify failed" it seems that the IoT Hub is trying to do Proof of Possession checks.

Using the same certificate with IoT-Hub-SDK works fine.

3) Self-signed,

With this option, i had no root ca, but self generated cert was used for a device.

But this fails to connect via moquitto_pub/sub.exe and mosquitto running as service with config file.

Can you please assist me in this regards?

Regards,

Arpit Panchal

解决方案

Hello Arpit,

Did you consult this doc already?

https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support#using-the-mqtt-protocol-directly

Thank you!


这篇关于与mostoto MQTT连接到Azure IoT Hub的麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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