Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Socket error on client<unknown>,disconnecting.(MQTT client is unable to connect with mosquitto broker through mqtt/tls protocol)
Socket error on client<unknown>,disconnecting. [message #1810613] Wed, 14 August 2019 10:38
Priya Sundararaj is currently offline Priya SundararajFriend
Messages: 3
Registered: August 2019
Junior Member
Hello everyone,
I am trying to connect MQTTBox(mqtt client app) with the following settings to Mosquitto broker installed in my PC of version 1.6.2 :

Protocol : mqtt/tls
SSL/TLS version : TLSv1.2
CA file : ca.crt
Client certificate : client.crt
Client key : client.key

At mosquitto broker side I made following changes in configuration file :

per_listener_settings false
allow_duplicate_messages false
max_keepalive 65535
port 8883
max_connections -1
protocol mqtt
cafile D:\mosquitto\cert\ca.crt
certfile D:\mosquitto\cert\ca_server.crt
keyfile D:\mosquitto\cert\ca_server.key
require_certificate true
tls_version tlsv1.2
use_identity_as_username true
use_subject_as_username false

But i get error on mosquitto broker while connecting as,

New connection from on port 8883.
Socket error on client<unknown>,disconnecting.

To understand the reason behind disconnection, i used openssl utility (1.1.1c version) and configured it as server with command
OpenSSL>s_server -www -port 8883 -CAfile ca.crt -cert client.crt -key client.key -state -tls1_2

here when i'm connecting MQTTBox with same settings i get following output at openssl and connection error is shown at MQTTBox :

SSL_accept : SSLv3/TLS read client hello
SSL_accept : SSLv3/TLS write server hello
SSL_accept : SSLv3/TLS write certificate
SSL_accept : SSLv3/TLS write key exchange
SSL_accept : SSLv3/TLS write server done
SSL_accept : SSLv3/TLS write server done
SSL_accept : SSLv3/TLS read client key exchange
SSL_accept : SSLv3/TLS read change cipher spec
SSL_accept : SSLv3/TLS read finished
SSL_accept : SSLv3/TLS write session ticket
SSL_accept : SSLv3/TLS write change cipher spec
SSL_accept : SSLv3/TLS write finished

What can be solution for this?? Is there any changes that i should make in configuration file?
Please suggest ideas to solve this problem.

Previous Topic:Get and add an action for Eclipse main toolbar's items in code
Next Topic:Kura publish data using mqtt to our own server
Goto Forum:

Current Time: Mon Feb 26 05:35:02 GMT 2024

Powered by FUDForum. Page generated in 0.03109 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top