[TCP/MQTT] Connection issue

Guillaume Paquet

Hello Zephyr community,


I contact you because I have an issue when I run mqtt_publisher example



I have the following issue when I have multiple mqtt connection/disconnection (through tcp transport_connect function)

[try_to_connect:233] mqtt_connect: -2 <ERROR>


I have this issue after 10 connection/disconnection. The eleventh one is always failing.

As I said you I saw that this is failing when I try to run mqtt_transport_connect(client); in client_connect.


My configuration is the following one :

  • MQTT (not secured)
  • TCP/IPv4
  • Broker on external server (not any issue on this one)


If you have any idea to help me


Thanks in advance


Best Regards





Guillaume  PAQUET – IoT Engineer

guillaume.paquet@...  -  02 40 18 50 91

1 Avenue Professeur Jean Rouxel – ZAC Fleuriaye

44470 CARQUEFOU – FRANCE                


Join devel@lists.zephyrproject.org to automatically receive all group messages.