Hello,
We're connecting to AWS IoT via an LTE connection, but have occasionally noticed some odd behavior. The device has an LTE data connection, and attempts to connect to IoT Core. However, the Core never seems to accept the connection, and I can't see anything in CloudWatch related to this connection.
The observed sequence is:
- Device sends a CONNECT request to IoT Core
- IoT Core sends a TCP ACK packet, acknowledging the request
I'd expect the sequence to go something like this:
- Device sends a CONNECT request to IoT Core
- IoT Core sends a TCP ACK packet, acknowledging the request
- IoT Core sends a CONNACK packet back
I have a PCAP file of the network transfers if that's useful. I can't figure out how to attach it to this, so here's a snapshot:
Note: the IP address 4.3.2.1 is simply a placeholder for our AWS IoT Core IP.
I am confident that the credentials work, as this does not always happen. The same device can connect with the same credentials at a later time. I just don't know why this sort of behavior occurs.
I've tried searching in the CloudWatch logs for the source IP address and deviceId, but there are no results for either, which is disappointing.
Thank you,
Jonathan
OK. What error does your client report? Are you saying it works most of the time for all your devices, with just occasional connection problems? Do your CloudWatch metrics report any errors or throttles described here: https://docs.aws.amazon.com/iot/latest/developerguide/metrics_dimensions.html#message-broker-metrics
There is no error per se, the connection just gets stuck in limbo (no message is received after the TCP ACK). So the application logic tries to connect again. EDIT: Also, I checked the metrics report and there are no throttles or errors around connect in the last week.