Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid broker address defined" error #12

Closed
virgilvox opened this issue May 21, 2020 · 11 comments
Closed

"Invalid broker address defined" error #12

virgilvox opened this issue May 21, 2020 · 11 comments

Comments

@virgilvox
Copy link

I'm getting this error. I have log set to true, all credentials and secrets parameters are correct, Adafruit PyPortal on version 5 firmware with the latest bundle, esp firmware version 1.6.0.

I also confirmed the minimqtt and AWS IoT libraries are both at the latest version. I'm using the simpletest example. I tried setting ssl to false as suggested by brentru and that didn't work either.

Traceback (most recent call last):
File "code.py", line 148, in
File "adafruit_aws_iot.py", line 155, in connect
File "adafruit_aws_iot.py", line 155, in connect
AWS_IOT_ERROR: ('Error connecting to AWS IoT: ', MMQTTException('Invalid broker address defined.', RuntimeError('ESP32 not responding',)))

@virgilvox
Copy link
Author

I enabled logs and it stops right after it tries to connect to mqtt. Tried secure and insecure. (is_ssl true/false)

12112.4: DEBUG - Attempting to establish insecure MQTT connection...
Traceback (most recent call last):
File "code.py", line 150, in
File "adafruit_aws_iot.py", line 155, in connect
File "adafruit_aws_iot.py", line 155, in connect
AWS_IOT_ERROR: ('Error connecting to AWS IoT: ', MMQTTException('Invalid broker address defined.', RuntimeError('ESP32 not responding',)))

@virgilvox
Copy link
Author

@brentru Have you had a chance to give this a try recently?

@brentru
Copy link
Member

brentru commented May 29, 2020

Hi Moheeb, I haven't had a moment to look into this yet. Does it still occur if you use the previous release of Adafruit_CircuitPython_MiniMQTT ?

@virgilvox
Copy link
Author

So its still an issue. I just checked the nina firmware and dont find the the AWS root cert in there for AWS IoT https://github.com/adafruit/nina-fw/blob/master/data/roots.pem

@virgilvox
Copy link
Author

Made a pull request there to add. adafruit/nina-fw#21

@virgilvox
Copy link
Author

Just tested with the changes I made in that pull request, it works now. Closing this issue. Lmk when you get a chance to look at the PR / make a release <3

@darianbjohnson
Copy link

@virgilvox - I'm getting this error (using v 1.6.1 of nini_fw); is there a chance that a new root cert for AWS needs to be added?

@brentru
Copy link
Member

brentru commented Oct 30, 2020

@darianbjohnson Hi Darian. IIRC @virgilvox is not currently affiliated with AWS IoT.

Could you ask Amazon AWS IoT for a new root certificate? I will be happy to add it to nina-fw.

@darianbjohnson
Copy link

@brentru I'm not 100% sure it's a root cert issue. The code connects using Arduino.... so in theory that means the issue is not related to the cert. I'll do more research and come back with something more definitive....

@brentru
Copy link
Member

brentru commented Nov 9, 2020

@darianbjohnson Could you copy and paste the Arduino code you're using?

@speccy88
Copy link

speccy88 commented Jan 3, 2021

Most of the time, I found out that if the broker is working and the address is fine and I have this error, it is because I needed to set "is_ssl" to False
see the doc : https://circuitpython.readthedocs.io/projects/minimqtt/en/latest/api.html#adafruit_minimqtt.adafruit_minimqtt.MQTT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants