You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use CLI to connect to MQTT via WSS with client certificate & key. The same options work in GUI, but not with the CLI. When I use --debug I can see that CLI has some logic where it thinks protocol is mqtts even if I specify protocol as WSS.
What happened
Note: I am trying this with my internal MQTT broker. I am using broker.emqx.io just as example.
What did I do
I am trying to use CLI to connect to MQTT via WSS with client certificate & key. The same options work in GUI, but not with the CLI. When I use --debug I can see that CLI has some logic where it thinks protocol is mqtts even if I specify protocol as WSS.
What happened
Note: I am trying this with my internal MQTT broker. I am using broker.emqx.io just as example.
✅ Works (Username + Password)
mqttx conn --debug --mqtt-version 3.1.1 --protocol "wss" --insecure -h "broker.emqx.io" -p 8084 --client-id "ThisWillWork" -u "user" -P "pass"
❌ Does not work (Key + Cert + CA)
mqttx conn --debug --mqtt-version 3.1.1 --protocol "wss" --insecure -h "broker.emqx.io" -p 8084 --client-id "ThisWillNotWork" --key "C:\Temp\client.key" --cert "C:\Temp\client.pem" --ca "C:\Temp\server.pem"
Expected
I expect that I can use WSS and certificate based authentication to connect / subscribe / publish, which works in the GUI.
Environment
More detail
CLI Debug when using Cert + Key. Notice protocol = mqtts on second line
CLI when using username + password. Notice the second line indicates 'wss' and correctly forms the URI
wss://broker.emqx.io:8084/mqtt
The text was updated successfully, but these errors were encountered: