Mosquitto MQTT constant messages in log and need time stamp

I am having a little issues with a couple of my Tasmota devices and checking in the Mosquitto MQTT log it is being flooded with these messages:

623128720: New connection from 172.30.32.2 on port 1883.
1623128720: Socket error on client <unknown>, disconnecting.
1623128840: New connection from 172.30.32.2 on port 1883.
1623128840: Socket error on client <unknown>, disconnecting.
1623128874: Saving in-memory database to /data/mosquitto.db.
1623128960: New connection from 172.30.32.2 on port 1883.
1623128960: Socket error on client <unknown>, disconnecting.
1623129080: New connection from 172.30.32.2 on port 1883.
1623129080: Socket error on client <unknown>, disconnecting.

I am running HA as a docker inside ESXi, my IOT network is 192.168.72.x, ESXi reports the other internal address as 172.30.22.1

No idea what the 172.30.32.2 address is.

How do I stop these unnecessary messages? AND

How do I get the log to display the proper time?
I have seen these in the documentation:

log_timestamp [ true | false ]

    Boolean value, if set to true a timestamp value will be added to each log entry. The default is true.

    Reloaded on reload signal.
log_timestamp_format format

    Set the format of the log timestamp. If left unset, this is the number of seconds since the Unix epoch. This option is a free text string which will be passed to the strftime function as the format specifier. To get an ISO 8601 datetime, for example:

    log_timestamp_format %Y-%m-%dT%H:%M:%S

I tried to add them to the Options in the Mosquitto configuration but it says it is invalid.

Help Please!

It is the Home Assistant Docker network.

Sounds like the Home Assistant MQTT integration has invalid credentials. Did you store any when setting up the integration?

You shouldn’t have had to (it is automatic) but occasionally this happens during the config flow for some reason.

So how do I fix it?

You could try deleting the MQTT integration (not the broker) and re-addding it.

Your existing devices should be restored by retained discovery messages in the broker. A restart may be required.

I believe it’s the Supervisor container (if you are running Home Assistant OS or Home Assistant Supervised).

Yeah, and I’ve just found that the error is a normal part of the supervisor operation:

1 Like

Frenck said:

That is the supervisor checking if the add-on is still responding as part of a health check. This is expected, not a bug and actually good.

That’s interesting because I’m running the latest version of Supervisor (2021.06.3) and I don’t get those “actually good” socket errors reported in my MQTT broker’s log. :man_shrugging:

The MQTT broker is the Mosquitto Add-On but it’s version 5.1 (not the latest version 6.0.1). I don’t know if that has any bearing on the matter.

I’m running

Mosquitto addon 6.0.1
Supervisor 2021.06.3

And pretty much all I see in the Mosquitto log is this every two seconds:

2021-06-23T23:05:01: New connection from 172.30.32.2 on port 1883.
2021-06-23T23:05:01: Socket error on client <unknown>, disconnecting.
1 Like

Looks like another reason for me to stay with version 5.1. I don’t need the log spammed with “good” connection errors.

1 Like

3 years later, is there a solution to avoid the supervisor spamming mosquitto log ?

2024-05-25 17:20:08: New connection from 172.30.32.2:59354 on port 1883.
2024-05-25 17:20:08: Client <unknown> closed its connection.
2024-05-25 17:22:08: New connection from 172.30.32.2:42436 on port 1883.
2024-05-25 17:22:08: Client <unknown> closed its connection.
2024-05-25 17:24:08: New connection from 172.30.32.2:36686 on port 1883.
2024-05-25 17:24:08: Client <unknown> closed its connection.
2024-05-25 17:26:08: New connection from 172.30.32.2:35010 on port 1883.
2024-05-25 17:26:08: Client <unknown> closed its connection.
2024-05-25 17:28:08: New connection from 172.30.32.2:39460 on port 1883.
2024-05-25 17:28:08: Client <unknown> closed its connection.
2024-05-25 17:30:08: New connection from 172.30.32.2:45034 on port 1883.
2024-05-25 17:30:08: Client <unknown> closed its connection.

At first this is scary for rookie like me: WTH is this unknow client trying to connect to my broker ???

Then after googling, I find out that it is a well known, valid client. The flood of messages is only pollution hiding more important messages.

Is there a setting somewhere to avoid the flood of useless messages in the log ?

mosquitto 6.4.0
Core 2024.5.3
Supervisor 2024.05.1
Operating System 12.3
Frontend 20240501.1

Thanks

Switch off the watchdog on the add-on main page.

The add-on now wont restart if it crashes though.