I can't connect to wss of mosquitto
listener 8084
protocol websockets
allow_anonymous true
cafile C:/Program Files/mosquitto/Firebase/public/certificates/ca.crt
certfile C:/Program Files/mosquitto/Firebase/public/certificates/server.crt
keyfile C:/Program Files/mosquitto/Firebase/public/certificates/server.key
require_certificate false
tls_version tlsv1
client = new Paho.MQTT.Client("172.20.108.159", Number(8084), "/mqtt", "paho-client-" + Math.random().toString(36).substring(2));
console.log is
WebSocket connection to 'wss://172.20.108.159:8084/mqtt' failed:
Paho.MQTT.ClientImpl._doConnect @ mqttws31.js:979
My Ipv4 is 172.20.108.159 and I use MQTTX connect correct
I can't connect and I want fix it
Your question is not clear, but I'll assume you are connecting from JavaScript running in a web browser.
The browser will need to trust the CA that signed your broker's certificate before you try and connect. It will NOT prompt you to trust an unknown certificate like it will when opening a webpage for the first time.
You will need to import the CA certificate into the browser's trust store.
The broker certificate will also need to have the correct CN and SAN entries to match the IP address and hostname used to connect.