MQTT Gateway floods logfile if broker is not reachable
-
mysgw (the mysensors gateway) sends a continuous flow of error messages to the log file if mysgw is started and the configured mqtt broker is not available. I am running a quite recent version (built on Dec 5, 2018), branch master.
My problem with mysgw is the excessive logging. I know I can resolve it by configuring my mqtt broker, but mysgw should not produce such a massive amount of logging if the mqtt broker is not available.Dec 5 11:19:13 raspberrypi mysgw: failed to connect Dec 5 11:19:13 raspberrypi mysgw: GWT:RMQ:MQTT RECONNECT Dec 5 11:19:13 raspberrypi mysgw: connect: Connection refused Dec 5 11:19:13 raspberrypi mysgw: failed to connect Dec 5 11:19:13 raspberrypi mysgw: GWT:RMQ:MQTT RECONNECT Dec 5 11:19:13 raspberrypi mysgw: connect: Connection refused Dec 5 11:19:13 raspberrypi mysgw: failed to connect Dec 5 11:19:13 raspberrypi mysgw: GWT:RMQ:MQTT RECONNECT Dec 5 11:19:13 raspberrypi mysgw: connect: Connection refused Dec 5 11:19:13 raspberrypi mysgw: failed to connectStarted on the command line (only first lines copied, there are hundreds of lines per second):
root@raspberrypi:/home/pi# mysgw Dec 05 11:26:42 INFO Starting gateway... Dec 05 11:26:42 INFO Protocol version - 2.3.0 Dec 05 11:26:42 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,VER=2.3.0 Dec 05 11:26:42 DEBUG TSF:LRT:OK Dec 05 11:26:42 DEBUG TSM:INIT Dec 05 11:26:42 DEBUG TSF:WUR:MS=0 Dec 05 11:26:42 DEBUG TSM:INIT:TSP OK Dec 05 11:26:42 DEBUG TSM:INIT:GW MODE Dec 05 11:26:42 DEBUG TSM:READY:ID=0,PAR=0,DIS=0 Dec 05 11:26:42 DEBUG MCO:REG:NOT NEEDED Dec 05 11:26:42 DEBUG MCO:BGN:STP Dec 05 11:26:42 DEBUG MCO:BGN:INIT OK,TSP=1 Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect -
mysgw (the mysensors gateway) sends a continuous flow of error messages to the log file if mysgw is started and the configured mqtt broker is not available. I am running a quite recent version (built on Dec 5, 2018), branch master.
My problem with mysgw is the excessive logging. I know I can resolve it by configuring my mqtt broker, but mysgw should not produce such a massive amount of logging if the mqtt broker is not available.Dec 5 11:19:13 raspberrypi mysgw: failed to connect Dec 5 11:19:13 raspberrypi mysgw: GWT:RMQ:MQTT RECONNECT Dec 5 11:19:13 raspberrypi mysgw: connect: Connection refused Dec 5 11:19:13 raspberrypi mysgw: failed to connect Dec 5 11:19:13 raspberrypi mysgw: GWT:RMQ:MQTT RECONNECT Dec 5 11:19:13 raspberrypi mysgw: connect: Connection refused Dec 5 11:19:13 raspberrypi mysgw: failed to connect Dec 5 11:19:13 raspberrypi mysgw: GWT:RMQ:MQTT RECONNECT Dec 5 11:19:13 raspberrypi mysgw: connect: Connection refused Dec 5 11:19:13 raspberrypi mysgw: failed to connectStarted on the command line (only first lines copied, there are hundreds of lines per second):
root@raspberrypi:/home/pi# mysgw Dec 05 11:26:42 INFO Starting gateway... Dec 05 11:26:42 INFO Protocol version - 2.3.0 Dec 05 11:26:42 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,VER=2.3.0 Dec 05 11:26:42 DEBUG TSF:LRT:OK Dec 05 11:26:42 DEBUG TSM:INIT Dec 05 11:26:42 DEBUG TSF:WUR:MS=0 Dec 05 11:26:42 DEBUG TSM:INIT:TSP OK Dec 05 11:26:42 DEBUG TSM:INIT:GW MODE Dec 05 11:26:42 DEBUG TSM:READY:ID=0,PAR=0,DIS=0 Dec 05 11:26:42 DEBUG MCO:REG:NOT NEEDED Dec 05 11:26:42 DEBUG MCO:BGN:STP Dec 05 11:26:42 DEBUG MCO:BGN:INIT OK,TSP=1 Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect Dec 05 11:26:42 DEBUG GWT:RMQ:MQTT RECONNECT Dec 05 11:26:42 ERROR connect: Connection refused Dec 05 11:26:42 ERROR failed to connect -
@cvdenzen would you mind checking if the development branch has the same behavior? (the master branch is only updated when a new release is made so it has not changed since June)
@mfalkvidd The development branch has the same behavior. An edit in core/MyGatewayTransportMQTTClient.cpp (I added a "delay(3000)" after line 148 in reconnectMQTT(void)) made it a lot better!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login