socket.error: [Errno 32] Broken pipe while publishing data from Raspberry Pi

32 views
Skip to first unread message

Jyoti sharma

unread,
Dec 28, 2017, 1:10:58 PM12/28/17
to MQTT
Hi,

From my Raspberry Pi 3, I am publishing the data with topic "outTopic" in a loop in 3 seconds interval. But I get crash around half an hour.

I did not understand why is it crashing? It looks like there is some issue with mqtt python library?

 mqttc.publish("outTopic", buf)


Traceback (most recent call last):
  File "publish_to_ec2_add_sensors.py", line 146, in <module>
    mqttc.publish("outTopic", buf)
  File "/usr/lib/python2.7/dist-packages/mosquitto.py", line 778, in publish
    rc = self._send_publish(local_mid, topic, local_payload, qos, retain, False)
  File "/usr/lib/python2.7/dist-packages/mosquitto.py", line 1592, in _send_publish
    return self._packet_queue(PUBLISH, packet, mid, qos)
  File "/usr/lib/python2.7/dist-packages/mosquitto.py", line 1760, in _packet_queue
    return self.loop_write()
  File "/usr/lib/python2.7/dist-packages/mosquitto.py", line 986, in loop_write
    rc = self._packet_write()
  File "/usr/lib/python2.7/dist-packages/mosquitto.py", line 1380, in _packet_write
    write_length = self._sock.send(packet.packet[packet.pos:])
socket.error: [Errno 32] Broken pipe

Reply all
Reply to author
Forward
0 new messages