paho.mqtt.python icon indicating copy to clipboard operation
paho.mqtt.python copied to clipboard

MQTT Client/Broker recives/send code 4

Open cah-sachin opened this issue 7 years ago • 3 comments

Paho 1.1 Python:

In our experiment, we are sending last 72 hour data to AWS cloud. While sending it it publishes at very fast rate. Probably couple of in few microsecond. We have verified we are not crossing any limits of AWS cloud.

While dequeuing the data we fetch it from redis queue and send to cloud. For some time it works fine, in between d-queuing the data broker/client responds with result code 4 which means client is not connected.

I am consistently able to reproduce this locally. This is happening because,

Our client is hitting on below method and returning the 4. [ client.py file from paho library version 1.1 ] def _send_publish(self, mid, topic, payload=None, qos=0, retain=False, dup=False): if self._sock is None and self._ssl is None: return MQTT_ERR_NO_CONN

Not sure, why the self._sock or self._ssl is None while d-queing the data at very fast rate. Could you guys help here ?

cah-sachin avatar Sep 10 '18 22:09 cah-sachin

Version 1.1 starts to be an old version :(

Can you try with latest version ?

PierreF avatar Sep 13 '18 07:09 PierreF

Same Issue with 1.4.0 version. Debugger stopped at below line 2269 of _send_publish method inside client.py file.

if self._sock is None: return MQTT_ERR_NO_CONN

cah-sachin avatar Sep 17 '18 20:09 cah-sachin

Are you still seeing this with v1.6.1? (sorry - I'm trying to ascertain what issues are current and duplicating this looks tricky - if you have an example app that would be helpful).

MattBrittan avatar Dec 24 '23 00:12 MattBrittan

I'm going to close this due to lack of activity/reproducability. I feel it' may be a duplicate of #328 but there is insufficient info to be sure.

MattBrittan avatar Jul 17 '24 22:07 MattBrittan