Page 1 of 1

MQTT connect failed after a week: transport_read() errno=128

Posted: Fri Mar 03, 2023 8:30 pm
by sebams
Hi, I was running tests on an ESP32 with ESP Rainmaker and ESP insights. The code was working ok for ten days or so, but it appears offline in the app since January 21.

The error that sends through the terminal is shown below:

Code: Select all

(6250) esp_mqtt_glue: Waiting for MQTT connection. This may take time.
(6280) esp_rmaker_time: Waiting for time to be synchronized. This may take time.
(6890) esp-x509-crt-bundle: Certificate validated
...
(10770) Dynamic Impl: mbedtls_ssl_fetch_input error=76
(10770) esp-tls-mbedtls: read error :-0x004C:
(10770) transport_base: esp_tls_conn_read error, errno=Socket is not connected
(10780) mqtt_client: esp_mqtt_handle_transport_read_error: transport_read() error: errno=128
(10790) esp_mqtt_glue: MQTT_EVENT_ERROR
(10790) mqtt_client: esp_mqtt_connect: mqtt_message_receive() returned -1
(10800) mqtt_client: MQTT connect failed
(10810) esp_mqtt_glue: MQTT Disconnected. Will try reconnecting in a while...
This error repeats every time the ESP32 tries to connect to the MQTT server.

I've tried a few things to solve the problem (reboot, erase flash and flash it again) but wasn't lucky .
Also I've flashed another ESP32 board with the same firmware, and it works ok.

Is there any chance that the MQTT broker of rainmaker is rejecting the connection for this particular chip? (maybe exceeded some bandwith)?

Btw I'm working with ESP-IDF v5.0.

Thanks, Sebastián.

Re: MQTT connect failed after a week: transport_read() errno=128

Posted: Sat Mar 04, 2023 4:30 am
by ESP_Piyush
Please refer to this post and see if your device falls under that category.