This error is reported based on running an MQTTv311 compliance test against the hbmqtt:
[2016-04-05 06:44:39,596] :: INFO - Listener 'default': 1 connections acquired
[2016-04-05 06:44:40,605] :: INFO - Listener 'default': 2 connections acquired
[2016-04-05 06:44:40,606] :: INFO - Connection from 127.0.0.1:58478 on listener 'default'
[2016-04-05 06:44:40,607] :: WARNING - Delete session : session MQTTClient601540 doesn't exist
[2016-04-05 06:44:42,612] :: INFO - Listener 'default': 1 connections acquired
[2016-04-05 06:44:43,619] :: INFO - Listener 'default': 2 connections acquired
[2016-04-05 06:44:43,619] :: INFO - Connection from 127.0.0.1:58479 on listener 'default'
[2016-04-05 06:44:43,621] :: WARNING - Delete session : session MQTTClient615657 doesn't exist
[2016-04-05 06:45:04,629] :: WARNING - Can't add PUBREL waiter, a waiter already exists for message Id '2'
Traceback (most recent call last):
File "/usr/local/bin/hbmqtt", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/site-packages/scripts/broker_script.py", line 73, in main
loop.run_forever()
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 301, in run_forever
self._run_once()
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 1198, in _run_once
handle._run()
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(value)
File "/usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py", line 559, in handle_publish
yield from self._handle_message_flow(incoming_message)
File "/usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py", line 203, in _handle_message_flow
yield from self._handle_qos2_message_flow(app_message)
File "/usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py", line 339, in _handle_qos2_message_flow
raise HBMQTTException(message)
hbmqtt.errors.HBMQTTException: Can't add PUBREL waiter, a waiter already exists for message Id '2'
[2016-04-05 06:45:04,690] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<coro() running at /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/coroutines.py:198>>
[2016-04-05 06:45:04,690] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<coro() running at /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/coroutines.py:198>>
[2016-04-05 06:45:04,700] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<Broker._broadcast_loop() running at /usr/local/lib/python3.5/site-packages/hbmqtt/broker.py:624> wait_for=<Future pending cb=[Task._wakeup()]>>
[2016-04-05 06:45:04,701] :: ERROR - Task exception was never retrieved
future: <Task finished coro=<ProtocolHandler.handle_publish() done, defined at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py:552> exception=HBMQTTException("Can't add PUBREL waiter, a waiter already exists for message Id '2'",)>
Traceback (most recent call last):
File "/usr/local/bin/hbmqtt", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/site-packages/scripts/broker_script.py", line 73, in main
loop.run_forever()
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 301, in run_forever
self._run_once()
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 1198, in _run_once
handle._run()
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(value)
File "/usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py", line 559, in handle_publish
yield from self._handle_message_flow(incoming_message)
File "/usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py", line 203, in _handle_message_flow
yield from self._handle_qos2_message_flow(app_message)
File "/usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py", line 339, in _handle_qos2_message_flow
raise HBMQTTException(message)
hbmqtt.errors.HBMQTTException: Can't add PUBREL waiter, a waiter already exists for message Id '2'
[2016-04-05 06:45:04,704] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<ProtocolHandler._reader_loop() running at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py:369> wait_for=<Future pending cb=[Task._wakeup()]>>
[2016-04-05 06:45:04,704] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<MQTTFixedHeader.from_stream() running at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/packet.py:69> cb=[_release_waiter(<Future pendi...sk._wakeup()]>)() at /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py:336]>
[2016-04-05 06:45:04,704] :: WARNING - BrokerProtocolHandler Unhandled exception in reader coro: GeneratorExit()
Exception ignored in: <generator object ProtocolHandler._reader_loop at 0x1106600a0>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py", line 431, in _reader_loop
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 214, in cancel
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 227, in cancel
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 242, in _schedule_callbacks
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 453, in call_soon
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 462, in _call_soon
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 289, in _check_closed
RuntimeError: Event loop is closed
[2016-04-05 06:45:04,705] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<ProtocolHandler.handle_publish() running at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py:559> wait_for=<Future cancelled>>
[2016-04-05 06:45:04,705] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<BrokerProtocolHandler.wait_disconnect() running at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/broker_handler.py:44> wait_for=<Future pending cb=[Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py:400]>
[2016-04-05 06:45:04,706] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<BrokerProtocolHandler.get_next_pending_unsubscription() running at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/broker_handler.py:94> wait_for=<Future pending cb=[Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py:400]>
[2016-04-05 06:45:04,706] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<BrokerProtocolHandler.get_next_pending_subscription() running at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/broker_handler.py:89> wait_for=<Future pending cb=[Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py:400]>
[2016-04-05 06:45:04,706] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<ProtocolHandler.mqtt_deliver_next_message() running at /usr/local/lib/python3.5/site-packages/hbmqtt/mqtt/protocol/handler.py:457> wait_for=<Future pending cb=[Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py:400]>
[2016-04-05 06:45:04,707] :: ERROR - Task was destroyed but it is pending!
task: <Task pending coro=<stream_connected() running at /usr/local/lib/python3.5/site-packages/hbmqtt/broker.py:321> wait_for=<Future pending cb=[Task._wakeup()]>>