AmazonMQ MQTT quickstart "forbidden" error

0

I have created an MQTT broker following the getting started steps https://us-east-1.console.aws.amazon.com/amazon-mq/home?region=us-east-1#/brokers/new, with: Apache ActiveMQ, single-instance, mq.t3.micro. Inbound rules allow public access for the console (:8162) and mqtt (:8883) connections, and I've successfully logged into the console.

But when I try to connect to the broker and publish using a Python paho mqtt client, I get a "connected with result code 5" error, meaning "forbidden".

I tried editing the broker configuration file to add a <simpleAuthenticationPlugin> to configure client usernames and passwords, but the editor stripped it out:

Your XML has been sanitized. Invalid and unsupported XML elements and attributes have been removed.Info Element: simpleAuthenticationPlugin Reason: Unsupported element.

EDIT: Messages can be published and received using the web console admin username/password. But the "Getting Started" provided no information on how to configure and authenticate individual clients. What is the easiest way to allow a few individual clients to connect to a micro broker?

質問済み 1年前140ビュー
1回答
0

Hi Ron, I realize you asked this question a long time ago, but wanted to provide an answer here in case others also have the same questions.
1/ I would guess that your connection error is either caused by the client not supporting / using TLS (which is why the port is 8883 instead of the non-TLS 1883), or the wrong username/password being provided by the client.

2/ For adding additional users, you use the AmazonMQ console for ActiveMQ. You can add additional users towards the bottom of the configuration page. This is not done within the broker config file as you would do on a self-hosted ActiveMQ instance, and as you saw if you try to edit the config the XML will be stripped out. More info here on permitted configuration elements: https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/permitted-elements.html

BR, Chris

AWS
Chris C
回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ