Stuck in connect/disconnect loop #329
-
I'm using the sample code at https://aws.amazon.com/premiumsupport/knowledge-center/iot-core-publish-mqtt-messages-python/ When I run the code, the MQTT Test Client shows that the device is connecting and disconnecting 2-3 times per second. The disconnect reason is CLIENT_ERROR, but I'm not sure where to go from here. $aws/events/presence/disconnected/fake-iot-device-1 { $aws/events/presence/connected/fake-iot-device-1 { |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I think I figured it out. I enabled error logging in CloudWatch, which showed that I was actually getting an Authorization Error. Dug into that and found an issue in the policy. Not sure why it was giving a Client_Error message at first, but maybe this will help if anyone else has the same issue. |
Beta Was this translation helpful? Give feedback.
-
Hi tallgaijin, |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I believe the error message could be more explicit in detailing what's happened. AWS' documentation of the 'CLIENT_ERROR' didn't provide much help either. But yeah, I've found it's usually something to do with the policy. For example, the client trying to publish or subscribe to a topic not defined in the policy. |
Beta Was this translation helpful? Give feedback.
I think I figured it out.
I enabled error logging in CloudWatch, which showed that I was actually getting an Authorization Error. Dug into that and found an issue in the policy. Not sure why it was giving a Client_Error message at first, but maybe this will help if anyone else has the same issue.