Failed to receive data over network: SSL_read failed: ErrorStatus=(null).

0

Im trying to establishing the MQTT , but im getting these error:

[DEBUG] [MQTT] [mqtt_establish_session] Establishing an MQTT session to XXXXXXXXX-ats.iot.eu-west-2.amazonaws.com:8883. [ERROR] [Transport_OpenSSL_Sockets] [Openssl_Recv] Failed to receive data over network: SSL_read failed: ErrorStatus=(null). [ERROR] [MQTT] [MQTT_GetIncomingPacketTypeAndLength] A single byte was not read from the transport: transportStatus=-1. [ERROR] [MQTT] [receiveConnack] CONNACK recv failed with status = MQTTRecvFailed. [ERROR] [MQTT] [MQTT_Connect] MQTT connection failed with status = MQTTRecvFailed. [ERROR] [MQTT] [mqtt_establish_session] Establishing the MQTT session failed. [ERROR] [MAIN] [handle_mqtt_establish_error] Bad parameter. Resettig the MQTT and TLS sessions. [DEBUG] [MAIN] [main] Initialising the network state. [DEBUG] [MAIN] [main] Establishing a TLS connection to XXXXXXXXX-ats.iot.eu-west-2.amazonaws.com. [INFO] [MAIN] [main] Established a TLS connection to XXXXXXXXX-ats.iot.eu-west-2.amazonaws.com.

pojitha
asked 5 months ago211 views
1 Answer
1

The errors you are encountering here appear to be numerous. Kindly check your AWS IoT endpoint and verify that it aligns with your AWS IoT region. Additionally, consider using the following command for debugging to help identify SSL/TLS handshake issues :- openssl s_client -connect XXXXXXXXX-ats.iot.eu-west-2.amazonaws.com:8883 Lastly, given that you are running the MQTT client on AWS resources (e.g., EC2), ensure that the IAM role associated with the resource possesses the necessary permissions to establish a connection to AWS IoT.

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions