EMQ X Broker installed at IP 222.x.y.z.
And two Mosquitto client.
I want to publish message from Mosquitto_client_2 then receive Mosquitto_client_1.
I do like this:
Step 1: run command:
mosquitto_sub -h 222.x.y.z -t "TEST_TEST"
on Client_1
Step 2: EMQ X Broker auto create topic "TEST_TEST", like this
Step 3: Mosquitto client 2 publish message, run command:
mosquitto_pub -h 222.x.y.z -t TEST_TEST -m "hello world"
But it have problem "Error: Connection refused" like this:
I don't know the cause of the error and how to fix this error.
You should first eliminate the network problem and use telnet to determine whether the port can be accessed.
telnet localhost 1883
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.