hello every one,
hope so you all are fine.
there is a problem I am facing that when I tried to connect server on port 8884 it gives me error Attempting MQTT connection…failed, rc = -4 try again in 5 seconds but the connection is successfully built on port 8883 I don’t understand the reason behind this kindly help me to to over come this problem .
Thanks
HI @Hassan ,
In the HiveMQ Cloud cluster you have 2 interfaces:
| Port (TLS): | 8883 |
|---|---|
| Port (Websocket + TLS): | 8884 |
Authentication is with username and password. CA file (if needed) you can download from here: link.
We suggest using MQTT CLI as MQTT client. Then you can test as follows
mqtt publish --topic ${myTopic} --message ${myMessage} \
--host ${hostname} --port 8884 --ws \
--secure --debug \
--username ${myUsername} --password ${myPassword}
Where
- option
--wstells the client to use WebSocket protocol, - option
--securetells the client to use SSL, - option
--debugtells the client to output debug information to the stdout.
Or you can test as follows:
mqtt publish --topic ${myTopic} --message ${myMessage} \
--host ${hostname} --port 8883 \
--secure --debug \
--username ${myUsername} --password ${myPassword}
Where
- option
--securetells the client to use SSL, - option
--debugtells the client to output debug information to the stdout.
I hope this helps,
Dasha from HiveMQ team