MQTT errors, other board work OK
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
MQTT errors, other board work OK
After about a wheek I spent integrating Rainmaker in my other code, suddenly MQTT errors pop up.
I (819966) esp-x509-crt-bundle: Certificate validated
E (821996) mqtt_client: esp_mqtt_handle_transport_read_error: transport_read(): EOF
E (822006) mqtt_client: esp_mqtt_handle_transport_read_error: transport_read() error: errno=119
E (822006) esp_mqtt_glue: MQTT_EVENT_ERROR
E (822006) mqtt_client: esp_mqtt_connect: mqtt_message_receive() returned -2
E (822016) mqtt_client: MQTT connect failed
W (822026) esp_mqtt_glue: MQTT Disconnected. Will try reconnecting in a while...
I tried the exact same code on another board and it ran without problems. I tried everything, but desoldering the module and replacing it. This could damage my (custom) board I would appreciate any help.
I (819966) esp-x509-crt-bundle: Certificate validated
E (821996) mqtt_client: esp_mqtt_handle_transport_read_error: transport_read(): EOF
E (822006) mqtt_client: esp_mqtt_handle_transport_read_error: transport_read() error: errno=119
E (822006) esp_mqtt_glue: MQTT_EVENT_ERROR
E (822006) mqtt_client: esp_mqtt_connect: mqtt_message_receive() returned -2
E (822016) mqtt_client: MQTT connect failed
W (822026) esp_mqtt_glue: MQTT Disconnected. Will try reconnecting in a while...
I tried the exact same code on another board and it ran without problems. I tried everything, but desoldering the module and replacing it. This could damage my (custom) board I would appreciate any help.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: MQTT errors, other board work OK
I have been scratching my head what could have caused this. I see 2 possible causes.
1. In my experiments I have deleted the certificate on my phone, assuming it would be recreated the next time. Maybe I should not have done that?
2. The other, more likely, cause is that I ran afoul of your fair use policy. I did not send any data yet - I have even not yet implemented the callback routine - but I had a bug causing a reboot loop. In this loop the biard logged in each time. While I tried to find the bug, I left the board running. If the logon messsages count against the quota, it can very well be that this caused my board to be blacklisted.
If that is indeed the root cause, how can I re-instate my board without having to replace the module?
1. In my experiments I have deleted the certificate on my phone, assuming it would be recreated the next time. Maybe I should not have done that?
2. The other, more likely, cause is that I ran afoul of your fair use policy. I did not send any data yet - I have even not yet implemented the callback routine - but I had a bug causing a reboot loop. In this loop the biard logged in each time. While I tried to find the bug, I left the board running. If the logon messsages count against the quota, it can very well be that this caused my board to be blacklisted.
If that is indeed the root cause, how can I re-instate my board without having to replace the module?
Re: MQTT errors, other board work OK
To recover a deactivated device, you can erase the flash (or specifically the fctry partition), reset the device to factory settings and provision it once again using the ESP RainMaker phone app.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: MQTT errors, other board work OK
Thanks for your suggestion.
I already tried to erase the flash and re-appovision, but that did not work. I found that, after a erase I could get it to work OK after re-approvision, but the moment I powerd down the board and started again, the same errors came immediately back. I will try again.
I already tried to erase the flash and re-appovision, but that did not work. I found that, after a erase I could get it to work OK after re-approvision, but the moment I powerd down the board and started again, the same errors came immediately back. I will try again.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: MQTT errors, other board work OK
I had 2 devices that gave these problems. Stange thing is one of the recovered, and I can use it following your procedure, the other with the node ID mLkhDRgBmccJPSafqZek2Z did not recover. I do not know what is different.
Amny suggestions are welcome. At least I can now the development with the other board. As soon as I need the second board and I could not recover the fault, I will -very carefully- try to remove and replace the module.
Thanks for any suggestions!
Amny suggestions are welcome. At least I can now the development with the other board. As soon as I need the second board and I could not recover the fault, I will -very carefully- try to remove and replace the module.
Thanks for any suggestions!
Re: MQTT errors, other board work OK
On the backend side, we don't see the node mLkhDRgBmccJPSafqZek2Z as deactivated. We see that it is disconnected though. By any chance, did you use the same credentials on multiple devices? Or switched between assisted claiming and host driven claiming for the same device?
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: MQTT errors, other board work OK
It may very well be the problem.I used the same credentials for my login again.
I will look into things a bit more if I can resurrect my board somehow.
Thanks for your kind help and have a nice weekend,
Ron
I will look into things a bit more if I can resurrect my board somehow.
Thanks for your kind help and have a nice weekend,
Ron
Re: MQTT errors, other board work OK
I meant the device MQTT credentials, not the user login credentials. A single user can have upto 20 devices, so user login isn't an issue. However, if you use host driven claiming (using esp-rainmaker-cli) and flash the binary generated by it on more than one device, it will cause issues.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: MQTT errors, other board work OK
Thanks for the clarification. I would certainly have started on the wrong road.
I must honestly say I did never went into self-claiming and just used the defaults out of the examples. Can you please show me a link how to avoid these problems? I have now 2 identical boards, where 1 is working now.
Again thanks for your support.
Ron
I must honestly say I did never went into self-claiming and just used the defaults out of the examples. Can you please show me a link how to avoid these problems? I have now 2 identical boards, where 1 is working now.
Again thanks for your support.
Ron
Re: MQTT errors, other board work OK
If you are using ESP32, it would by default be Assisted Claiming and if you are using any other variant, it will be self claiming by default. If you have never used the rainmaker CLI for claiming, then whatever I said can be ignored and your certificates should stay valid. They can get invalidated only if you delete the node from the RainMaker dashboard. If one of your nodes is still failing, please send the node id and any other details you might want to share on esp-rainmaker-admin@espressif.com. Once the issue is resolved, we can put up the conclusions here for other readers' reference.
Who is online
Users browsing this forum: No registered users and 1 guest
