MQTT SSL error 10054

Hello, when I'm trying to connect to a MQTT broker using SSL I get the error # 10054.

  • MQTT without SSL is working fine.
  • I can connect to this broker using another tool (MQTT Explorer), so I'm sure the connection should work.

I'm using the DLL (libeay32.dll and ssleay32.dll) downloaded from but maybe they are not matching with your implementation of TMS MQTT.

I see in this other topic (TTMSMQTTClient and Delphi 10.4) that you deliver these DLL with the full VCL UI package, but I only have the MQTT part which doesn't contain any DLL.

Can you try sending me your DLL so that I can test the connection?

Thank you and best regards

Try from here: Index of /SSL
You should also check that you use the correct TLS version that your server supports

Hi Dimitris,

Oddly enough, with the DLL from your link I get the message 'Cannot load SSL Library'. But I could solve my problem this way:

  • I'm using the DLL which I was using before. Unfortunately I don't remember from where I downloaded them!
  • On the server side the connection was blocked by the broker (VerneMQ), it has been unblocked by the person managing the broker.
  • On my side I used the piece of code which you mentioned in your other topic to force the method to TLS1.2, otherwise the connection is not working:

with TIdSSLIOHandlerSocketOpenSSL(TMSMQTTClient.Connection.SSLIOHandler).SSLOptions do
Method := sslvTLSv1_2;
Mode:= sslmClient;

With these changes the connection is finally working.
Thank you!

1 Like