Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Bug Reports
  3. MQTT Gateway floods logfile if broker is not reachable

MQTT Gateway floods logfile if broker is not reachable

Scheduled Pinned Locked Moved Bug Reports
5 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cvdenzen
    wrote on last edited by
    #1

    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 connect
    

    Started 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
    
    mfalkviddM 1 Reply Last reply
    0
    • C cvdenzen

      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 connect
      

      Started 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
      
      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @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)

      C 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @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)

        C Offline
        C Offline
        cvdenzen
        wrote on last edited by
        #3

        @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!

        1 Reply Last reply
        1
        • C Offline
          C Offline
          cvdenzen
          wrote on last edited by
          #4

          Looks like this was solved in branch develop at Jan, 6, 2019:
          98355b2d ( tekka 2019-01-06 18:14:10 +0100 158) delay(1000);

          1 Reply Last reply
          1
          • mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            Thanks @cvdenzen

            Adding reference link in case someone needs to check it later: https://github.com/mysensors/MySensors/commit/98355b2d0b68190a87c3ac76698014adb58fc882#diff-407bf395289c3cbd3d7728909c25b3adR186

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            12

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular