Mosquitto broker terminating and starting about every minute?

I’m wondering anyone has seen this before. My mosquitto broker seems to go offline about every minute or so, for no apparent reason, it terminates and then starts again, clients are disconnected, and they reconnect. not sure what the deal is.

1586288339: New client connected from as Hub:001 (c0, k15, u’xxxxxxxx’).

1586288339: Sending CONNACK to Hub:001 (1, 0)

1586288354: Received PINGREQ from Hub:001

1586288354: Sending PINGRESP to Hub:001

1586288369: Received PINGREQ from Hub:001

1586288369: Sending PINGRESP to Hub:001

1586288384: Received PINGREQ from Hub:001

1586288384: Sending PINGRESP to Hub:001

1586288399: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.

1586288399: Received PINGREQ from Hub:001

1586288399: Sending PINGRESP to Hub:001

1586288414: Received PINGREQ from Hub:001

1586288414: Sending PINGRESP to Hub:001

1586288429: mosquitto version 1.4.15 terminating
**> **
> 1586288431: mosquitto version 1.4.15 (build date 2019-01-08 23:46:33-0800) starting

1586288431: Config loaded from /etc/mosquitto/mosquitto.conf.

1586288431: Opening ipv4 listen socket on port 1883.

1586288431: Opening ipv6 listen socket on port 1883.

1586288432: New connection from on port 1883.

1586288432: Client Hub:001 disconnected.

1586288432: New client connected from Hub:001 (c0, k15, u’xxxxxx’).

if I stop mosquitto and start with in verbose mode “mosquitto -v” this behavior seems to stop. but anytime mosquitto is starts on reboot with systemctl I get this behavior. any thoughts on this?
thanks much++

What OH version are you using?

Try stopping OH, cleaning the cache and after OH fully restarts do two more restarts of OH.

sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2

sudo systemctl restart openhab2

I’m not using the OH MQTT binding, it’s a mosquitto installation independent of my OH installation.

Mosquitto was not creating a file on startup for some odd reason. not sure if it’s the best way to go about it, but added:

ExecStartPost=/bin/sh -c ‘umask 022; pgrep mosquitto > /var/run/’

to my systemd startup file and it’s working fine now.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.