I'm trying to connect on WSS with ngx-mqtt So this is my code:
MQTT_SERVICE_OPTIONS: IMqttServiceOptions = { hostname: 'test.mosquitto.org', port: 8081, protocol: 'wss', path: '/mqtt' };
On my localhost:4200 i've installed the certificate and i'm using https://localhost:4200 So when i try to call this:
this.mqttService.connect(this.MQTT_SERVICE_OPTIONS);
I receive this error:
WebSocket connection to 'wss://test.mosquitto.org:8081/mqtt' failed: Error in connection establishment: net::ERR_CONNECTION_RESET
can you help me to understand how to solve this problem? Thanks
I've read on https://test.mosquitto.org/
1.4m articles
1.4m replys
5 comments
57.0k users