hbmqtt: asyncio Warning: BrokerProtocolHandler Unhandled exception in reader coro: IncompleteReadError
I get a lot of warning on Ubuntu 17.10 like this
[2018-03-30 13:05:45,416] :: WARNING - BrokerProtocolHandler Unhandled exception in reader coro: IncompleteReadError('0 bytes read on a total of 1 expected bytes',)
here’s the version
python3 --version
Python 3.6.3
pip3 freeze | grep hbmqtt
hbmqtt==0.9.2
hbmqtt
[2018-03-30 13:05:35,165] :: INFO - Exited state new
[2018-03-30 13:05:35,165] :: INFO - Entered state starting
[2018-03-30 13:05:35,166] :: INFO - Listener 'default' bind to 0.0.0.0:1883 (max_connections=-1)
[2018-03-30 13:05:35,166] :: INFO - Exited state starting
[2018-03-30 13:05:35,166] :: INFO - Entered state started
[2018-03-30 13:05:45,413] :: INFO - Listener 'default': 1 connections acquired
[2018-03-30 13:05:45,413] :: INFO - Connection from 127.0.0.1:49098 on listener 'default'
[2018-03-30 13:05:45,414] :: INFO - Exited state new
[2018-03-30 13:05:45,414] :: INFO - Entered state connected
[2018-03-30 13:05:45,416] :: WARNING - BrokerProtocolHandler Unhandled exception in reader coro: IncompleteReadError('0 bytes read on a total of 1 expected bytes',)
[2018-03-30 13:05:45,416] :: INFO - Exited state connected
[2018-03-30 13:05:45,417] :: INFO - Entered state disconnected
[2018-03-30 13:05:45,417] :: INFO - Listener 'default': 0 connections acquired
hbmqtt_pub --url "mqtt://localhost:1883" -t "test/sensor1" -m "ciao"
[2018-03-30 13:05:45,409] :: INFO - hbmqtt_pub/13323-nicklang-laptop Connecting to broker
[2018-03-30 13:05:45,415] :: INFO - Exited state new
[2018-03-30 13:05:45,415] :: INFO - Entered state connected
[2018-03-30 13:05:45,415] :: INFO - hbmqtt_pub/13323-nicklang-laptop Publishing to 'test/sensor1'
[2018-03-30 13:05:45,416] :: INFO - Exited state connected
[2018-03-30 13:05:45,416] :: INFO - Entered state disconnected
[2018-03-30 13:05:45,416] :: INFO - hbmqtt_pub/13323-nicklang-laptop Disconnected from broker
the broker work fine but I get warning for every sent message
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 20 (1 by maintainers)
Commits related to this issue
- Switch MQTT implementation to aiomqtt (Stability issues with the old library, see https://github.com/beerfactory/hbmqtt/issues/119) — committed to oxytu/deconz-to-mqtt by deleted user 5 years ago
I ‘fixed’ it by not useing hbmqtt anymore. Now using mosquitto.
Ok, think I’ve found out:
Same problem for me in Home Assistant, any fix yet? 2018-09-24 17:21:41 WARNING (MainThread) [hbmqtt.mqtt.protocol.handler] BrokerProtocolHandler Unhandled exception in reader coro: IncompleteReadError(‘0 bytes read on a total of 1 expected bytes’,)
Keeping with the tracing, I’ve dumped it happening with wireshark. Hex dump follows. After the last
c0 00
packet sent by hbmqtt, the server responds with a TCP RST (reset). Server is mosquitto 1.5.3 macos (homebrew).and a corresponding mosquitto log for the same error:
I’ve traced the error a bit. Added a logging.exception that shows:
Same issue here !
I discovered that the client is as well experiencing the same problem…