Frequent reconnects with Mosquitto
dersch81 opened this issue · 2 comments
Hi, i noticed within the Mosquitto log that the mPower devices are frequently reconnecting to my MQTT Broker Mosquitto. I have a few devices speaking with my broker but only the mPower show that behavior.
1546212156: New client connected from 192.168.11.7 as mosqpub|23132-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23132-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23137-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23137-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23141-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23141-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23145-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23145-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23149-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23149-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23152-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23152-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23155-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23155-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23158-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23158-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23160-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212156: Client mosqpub|23160-Wz-Ubnt-M disconnected. 1546212156: New connection from 192.168.11.7 on port 1883. 1546212156: New client connected from 192.168.11.7 as mosqpub|23162-Wz-Ubnt-M (c1, k60, u'dirk'). 1546212157: Client mosqpub|23162-Wz-Ubnt-M disconnected.
I'm just using MQTT in the mPower a few days but the log of Mosquitto is already 20M big and growing frequently:
-rw------- 1 107 111 20M Dez 31 00:21 mosquitto.log.1
Hello, I'm afraid this works as designed.
"mosqpub" is a command line tool which does not keep a session. It is started every 60 seconds and performs a connect to the broker.
You might consider to set connection_messages = false
in your broker.
Hi, ok thanks for that hint. I changed the mosquitto.conf to restrict the logging:
log_type error log_type warning
Now the frequent logging is solved and the file does not grow uncontrolled.