Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » TLS SSL Socket error on client , disconnecting(Can not connect using TLs SSL)
TLS SSL Socket error on client , disconnecting [message #1783732] Fri, 16 March 2018 11:48
Vicky Odi is currently offline Vicky OdiFriend
Messages: 1
Registered: March 2018
Junior Member
I am running mosquitto version 1.4.15 (build date 28/02/2018 16:01:56.25)
I followed steps in tutorial in given link below to try out MQTT over ssl/tls on Windows.

Tutorial followed.
steves-internet-guide for mosquitto-tls
{it is now allowing me to add link here but can be googled )
and
Enable Secure Communication with TLS and the Mosquitto Broker
Erich Styger

these tutorials are similar to Eclipse Mosquitto help but slightly more elaborate.

What is Issue:
================
I am getting error

" New connection from 10.186.0.66 on port 8883″
"Socket error on client , disconnecting." on server and
on client side I get "A TLS error occured".
I am using CN=My computer name where I am running mosquitto server. I tried client from VMWare and on same local machine where mosquitto sever is running both gives same error.


What I have tried so far
====================
I use mossquitto -v for broker on admin Cmd window
and Client is Mosquitto_pub on different admin Cmd window on same machine.

I have installed and used

Win32OpenSSL-1_1_0g installed.
from this installation I have copied following dlls to mosquitto folder
libcrypto-1_1.dll
libssl-1_1.dll
pthreadVC2.dll

My mosquitto conf file is default with following change

Require Certificate is false (as default)
and Allow_ anonymous is true (default) but set it explicitly as well

Difference from defualt/original mosquitto.conf is following
#port 1883 -> port 8883
cafile c:\mosquitto\certs\ca.crt
keyfile c:\mosquitto\certs\server.key
certfile c:\mosquitto\certs\server.crt

tried server key with/without passphrase

Tried different tls version v1 v1.1 v1.2.

I have run following command and don't get any error except
openssl s_client -showcerts -connect MyTest-PC:8883

Protocol : TLSv1.2
Verify return code: 18 (self signed certificate)

I used whireshark to see where is it going wrong and found that


Server hello is successfully done
Client sends Client key Exchange, Change Cipher spec, Encrypted handshake Message
that Server replys with RST and abruptly drops communication

Please find attached whireshark package capture file


I have checked following things

- firewall is not blocking TCP traffic
- tried different port number
- running mosquitto_pub on separate admin cmd (console window) ,
- running mosquitto_pub on vmware
- can establish mqtt communication without TLS/SSL
- make sure that password file is not mentioned and password required is off
- make sure allow allow_anonymous true (i.e default but tried explicitly set)
- tried --insecure on mosquitto_pub








Previous Topic:Mosquitto on Raspberry PI3
Next Topic:How To Install Mosquitto On Debian Stretch-Based Linux Distros
Goto Forum:
  


Current Time: Mon Sep 24 05:35:53 GMT 2018

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

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

Back to the top