Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent reconnects with Mosquitto #10

Closed
dersch81 opened this issue Dec 30, 2018 · 2 comments
Closed

Frequent reconnects with Mosquitto #10

dersch81 opened this issue Dec 30, 2018 · 2 comments

Comments

@dersch81
Copy link

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

@magcode
Copy link
Owner

magcode commented Dec 31, 2018

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.

@dersch81
Copy link
Author

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.

@magcode magcode closed this as completed Dec 31, 2018
@magcode magcode mentioned this issue Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants