CLEAN_SESSION Not work

I have problems when I connect to my mqtt broker, it looks like it doesn't do a CLEAN_SESSION.. according to server logs.. I see when I connect to test clients ( pc ) with CLEAN_SESSION then it clearly appears in the log. This creates a lot of problems e.g. the client id is not registered by mqtt broker.. etc..


conntions from nrf7002 is not clean=1 and not completed normally

Here log from my 7002 

connection.log:2025-02-23T05:52:07.044Z Connection tcpiop.1 CWLNA1117 I: Create mqtt connection: ConnectionID=599 ClientID="_85.166.49.173_dS9ZdNyj" Endpoint="mqtt-ssl-ldap" UserID="demo24" CommonName="" Durable=0.

connection.log:2025-02-23T05:52:07.247Z Connection tcpiop.1 CWLNA2202 W: A message consumer could not be created due to an authorization failure: ConnectionID=599 ClientID="_85.166.49.173_dS9ZdNyj" Protocol="mqtt4-tcp" Endpoint="mqtt-ssl-ldap" UserID="demo24".


this log from working test client ( pc mosquitto ) 

-connection.log:2025-02-23T20:12:14.118Z Connection tcpiop.1 CWLNA1117 I: Create mqtt connection: ConnectionID=3199 ClientID="41675380" Endpoint="mqtt-ssl-ldap" UserID="rb3" CommonName="" Durable=0.
-connection.log:2025-02-23T20:12:14.164Z Connection tcpiop.1 CWLNA1111 N: Closing TCP connection: ConnectionID=3199 MonitorID=3199 ClientID="41675380" Protocol=mqtt4-tcp Endpoint="mqtt-ssl-ldap" From=[85.166.49.173]:59917 UserID="rb3" Uptime=0 RC=0 Clean=1 Reason="The connection has completed normally." ReadBytes=818 ReadMsg=1 WriteBytes=2,141 WriteMsg=0 LostMsg=0 WarnMsg=0.

# MQTT
CONFIG_MQTT_LIB=y
CONFIG_MQTT_CLEAN_SESSION=y
CONFIG_MQTT_LOG_LEVEL_DBG=y

Is this a known problem? Is there any way to get a receipt that it is sending with a clean session? Does anyone have any suggestions?

Related