afra / v4runa

v4runa - our afra bot on #afra@hackint
0 stars 0 forks source link

mqtt: not receiving any payloads #6

Open lynxis opened 1 year ago

lynxis commented 1 year ago

v4runa didn't received any mqtt payloads. So the doorkicker didn't worked anymore. The mqtt connection seemed healthy, at least ping/pong messages came through.

There were still a lot of log messages. Maybe from a leaked mqtt connection?

Mar 09 10:52:52 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:52:52 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU <-in-- PingRespPacket(>
Mar 09 10:53:17 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:Scheduling Ping
Mar 09 10:53:17 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:53:17 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU -out-> PingReqPacket(t>
Mar 09 10:53:17 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:amqtt/i]f3f^daWtlI_dDU Input stream read timeout
Mar 09 10:53:17 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:53:17 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU <-in-- PingRespPacket(>
Mar 09 10:53:42 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:Scheduling Ping
Mar 09 10:53:42 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:53:42 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU -out-> PingReqPacket(t>
Mar 09 10:53:42 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:amqtt/i]f3f^daWtlI_dDU Input stream read timeout
Mar 09 10:53:42 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:53:42 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU <-in-- PingRespPacket(>
Mar 09 10:54:07 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:Scheduling Ping
Mar 09 10:54:07 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:54:07 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU -out-> PingReqPacket(t>
Mar 09 10:54:07 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:amqtt/i]f3f^daWtlI_dDU Input stream read timeout
Mar 09 10:54:07 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:54:07 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU <-in-- PingRespPacket(>
Mar 09 10:54:32 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:Scheduling Ping
Mar 09 10:54:32 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:54:32 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU -out-> PingReqPacket(t>
Mar 09 10:54:32 afra pipenv[325]: DEBUG:amqtt.mqtt.protocol.handler:amqtt/i]f3f^daWtlI_dDU Input stream read timeout
Mar 09 10:54:32 afra pipenv[325]: DEBUG:amqtt.client.plugins:Plugins len(_fired_events)=1
Mar 09 10:54:32 afra pipenv[325]: DEBUG:amqtt.client.plugins.packet_logger_plugin:amqtt/i]f3f^daWtlI_dDU <-in-- PingRespPacket(>
lynxis commented 1 year ago

The problem lies in amqtt. It doesn't properly handles reconnects or not even disconnects. See https://github.com/Yakifo/amqtt/pull/153 which fixes at least the disconnects and we can do the reconnect on our own.