'Client <unknown> disconnected : protocol error

I have mosquitto broker running in windows machine with this conf

allow_anonymous true
listener 1883
listener 8883
log_type all
log_dest file C:\MQTT_Send_Service_TLM\\mosquitto.log
log_dest stdout
log_dest topic
cafile C:\MQTT_Send_Service_TLM\PFE_2022_test_case_13\ca_public_certificate.pem
keyfile C:\MQTT_Send_Service_TLM\PFE_2022_test_case_13\server_private_key.pem
certfile C:\MQTT_Send_Service_TLM\PFE_2022_test_case_13\server_public_certificate.pem

tls certificates are generated by openssl 3.0.0 in windows machine

i have an embedded device running linux which have openssl 1.0.1p , i put the ca_public_certificate.pem generated in Windows machine in the embedded device and i try to connect to the broker with tls mode

i have the following logs :

mosquitto log :

New connection from <ip of the divice>:44763 on port 8883
Client <unknown> disconnected : protocol error

device log :

2022-05-17 09:56:02 [MQTT DBG] src/mqtt_client.c:746: MQTT Client TLM V1.0.7
2022-05-17 09:56:02 [MQTT DBG] src/mqtt_client.c:762: ssl://<broker ip>:8883
2022-05-17 09:56:02 [MQTT DBG] src/mqtt_client.c:340: Connecting with ssl [Prefered connection]...
2022-05-17 09:56:25 [MQTT DBG] src/mqtt_client.c:340: Connecting with ssl [Prefered connection]...
2022-05-17 09:56:25 [MQTT DBG] src/mqtt_client.c:349: Certificate name /media/apps/userfs/etc/certs/ca_public_certificate.pem...
2022-05-17 09:56:25 [MQTT DBG] src/mqtt_client.c:398: MQtt Connect status rc : 0
2022-05-17 09:56:25 [MQTT WAR] src/mqtt_client.c:200: MQTT Connection failed ...
2022-05-17 09:56:25 [MQTT WAR] src/mqtt_client.c:206: socket error

what can be the problem ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source