pycom / pycom-libraries

MicroPython libraries and examples that work out of the box on Pycom's IoT modules
334 stars 375 forks source link

MQTT error ECONNRESET #87

Closed robmarkcole closed 5 years ago

robmarkcole commented 5 years ago

Hi I am receiving the following error after 2 packets are published successfully, with source code here:

>>> client.publish("wipy/", "test")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/flash/lib/mqtt.py", line 110, in publish
OSError: [Errno 104] ECONNRESET

This error is reported in a couple of different threads on the forums, and perhaps can be resolved by implementing umqtt-robust. I don't get this error when publishing from my Mac.

UPDATE: I identified the root cause as my using the same client_id on multiple devices.

danspndl commented 5 years ago

Hi @robmarkcole 👋 Can I close this ticket then?

robmarkcole commented 5 years ago

HI @sdaniel55 if the error cannot be handled to provide more debugging info, then yes please close. However I could have saved 1 hr with some more debugging info and I'm sure i won't be the last to get this error. Therefore if it could be handeld better perhaps this can be a feature request? Cheers Robin

danspndl commented 5 years ago

@robmarkcole I'll mark it as a feature request then 😉 Do you have anything else to add? There's a feature request template for issues, if you need some guidance.

robmarkcole commented 5 years ago

To define the feature request: more informative messages on errors, thanks :-)