Hello,
Using ngx-mqtt wiht Angular 14, I have no problem connecting via port 8803 over ws.
However, even after installing the SLL Certificate via the EMQX Broker Dashboard, I cannot connect via a secure websocket.
here’s my conn string:
return {
hostname: 'xx.xx.87.182',
port: 8084,
path: '/mqtt',
clean: true,
connectTimeout: 4000,
reconnectPeriod: 4000,
clientId: 'BrowserTest1',
username: 'myUser...',
password: 'myPass...',
protocol: 'wss',
connectOnCreate: false,
};
I used the OpenSSL tool in Windows to generate certificate.pem, key.pem, and server.key.
I then manually copied/pasted the contents to the Cert Body and Cert Priv Key fields in your TLS/SLL CONFIG screen.
i.e. As per the example when you hover the fields in your UI, I copied the -----BEGIN/END CERTIFICATE----- section for the cert body, and also -----BEGIN/END PRIVATE KEY----- section for the private key.
Perhaps there’s additional data in those generated PEM files that I also should have included?