简体   繁体   English

创建事物和证书时,AWS IOT 核心上的 MQTT 连接丢失

[英]MQTT Connection lost on AWS IOT core when I create a thing and certificate

I am new to AWS IoT core and I have just created one simple thing and created certificate and also attached a policy to certificate and my thing.我是 AWS IoT 核心的新手,我刚刚创建了一个简单的东西并创建了证书,还为证书和我的东西附加了一个策略。

when I go to my certificate page I can see it has my policy attached to it and also my thing attached to it.当我转到我的证书页面时,我可以看到它附有我的政策以及我的东西。 (the policy has all resource * and has all IoT:* actions) (该策略包含所有资源 * 并包含所有 IoT:* 操作)

在此处输入图片说明 在此处输入图片说明

I think I am doing all correctly but when on AWS IoT portal I go to test, I always get "Mqtt connection lost. Reconnect."我认为我做的一切都是正确的,但是当我在 AWS IoT 门户上进行测试时,我总是收到“Mqtt 连接丢失。重新连接”。 on nitrification panel.在硝化板上。 在此处输入图片说明

I have also come up with some python codes and used the private key and certificate which I created from above but again my client program can not connect to AWS IoT.我还想出了一些 python 代码,并使用了我从上面创建的私钥和证书,但我的客户端程序再次无法连接到 AWS IoT。

I am not sure why the test doesn't work at all and I always get "Mqtt connection lost"?我不确定为什么测试根本不起作用,我总是收到“Mqtt 连接丢失”?

@Luckylukee - @Luckylukee -

Thanks for the screenshot!谢谢你的截图!

My experience says that your MQTT connection error has nothing to do with the configuration of your IoT devices/certificates/policies.根据我的经验,您的 MQTT 连接错误与您的 IoT 设备/证书/策略的配置无关。

Reason I say it is.. without any devices created in AWS IoT, you should still be able to click on 'Test' button and subscribe to topics without issues.我这么说的原因是......没有在 AWS IoT 中创建任何设备,您仍然应该能够单击“测试”按钮并毫无问题地订阅主题。

The error you reported is something very "core" between AWS IoT Test Tool and AWS IoT Server Endpoint (specific to your AWS account).您报告的错误是 AWS IoT 测试工具和 AWS IoT 服务器端点(特定于您的 AWS 账户)之间非常“核心”的东西。

Can you try these?你能试试这些吗?

  1. Use a different browser (not in private-mode) to do the same test.使用不同的浏览器(非私有模式)进行相同的测试。
  2. Use a different AWS Account (at least temporarily) to see if this TEST button works there!使用不同的 AWS 账户(至少暂时)查看此 TEST 按钮在那里是否有效! (Because, new AWS account will get you a new IoT Core Endpoint). (因为,新的 AWS 账户将为您提供一个新的 IoT 核心端点)。

Good Luck!祝你好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM