We are getting the following errors recently on one or more clients:
Exception while reading buffer data...
IN - Read exception

What could be the cause of this?

We would really need to have more information.
Is this v3 or v5 protocol?
Can this be isolated and sample source code be provided with which we can reproduce the problem here?

i do nothing with the protocol settings, so just the default i suppose.
I updates to the latest stable mosquitto broker.

i have logging of the component, but there we so nothing specific just the errors as they occur.

i come back later

i discovered in my own software, by logging the exceptions, could in the future the exceptions be forwarde to the logger construction? i catch the logging of the component now by:

MQTTInstance.Logger := FTMSLogger;
MQTTInstance.Logger.OnLog := CatchTMSMQTT;

but the onlog event, does not have the exception as a parameter.

back :slight_smile:
Some exceptions cause internal bu MQTT/INDY i get:

EIdReadTimeout, Read timed out.
EIdConnClosedGracefully, Connection Closed Gracefully.

can this be causes by Antivrus/Malware software?
(on some computers we get this at every startup of program, on some only first time startup of program, on most computers no problems).
All against the same MQTT broker on the same network.

problems seem to be cause by not reacting properly when in the first seconds after starting the application.

Just go a "new" exception type:
"IN - Read exception: EIdSocketError
Socket Error # 10053
Software caused connection abort."

We have now released v2.0.1.0
It has a new logger event OnLogEx that also returns the full exception.

If the other issues persist, we recommend to use a tool like DebugView++ GitHub - CobaltFusion/DebugViewPP: DebugView++, collects, views, filters your application logs, and highlights information that is important to you! to monitor debug messages from the client as well as check the broker log and when a problem occurs, send the information from both sides so we can further investigate.