Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » 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 #1810616] Wed, 14 August 2019 11:28 Go to next message
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 192.168.0.127 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

Please suggest ideas to solve this problem


Re: Socket error on client<unknown>,disconnecting. [message #1810618 is a reply to message #1810616] Wed, 14 August 2019 11:30 Go to previous message
Priya Sundararaj is currently offline Priya SundararajFriend
Messages: 3
Registered: August 2019
Junior Member
Priya Sundararaj wrote on Wed, 14 August 2019 11:28
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 192.168.0.127 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

Please suggest ideas to solve this problem



Previous Topic:Cannot receive messages from mosquitto broker
Next Topic:Web Based MQTT Client Feedback
Goto Forum:
  


Current Time: Fri Mar 29 10:25:48 GMT 2024

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

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

Back to the top