MQTT - Between 2 Ubuntu hosts in vmware

Hi friends,

I am new to MQTT. I am trying to setup MQTT between 2 ubuntu 18.x hosts installed in vmware. Both of these hosts has id address and I can even ping or ssh each other successfully.

Now in first Ubuntu host (machine 1 which i am going to use as publisher) i have installed mosquitto and mosquitto-clients and i see mosquitto running (command ps -e) and same installation is done on second ubuntu machine 2 (which i am going to use subscriber).

Now when i use below commands , i dont see message in the subscriber host.
Machine2 > mosquitto_sub -h <Machine 1 IPaddress> -t test
Machine1> mosquitto_pub -h <Machine 2 IPaddress> -t test -m "first message"

Nothing shows up in subscriber machine 2.
I also used -d switch on publisher machine to see if any clue but didnt get any info.
Any help to solve this problem will be of great help

Do you know what version of mosquito is installed? As of version 2 it is defaulted to only accept connections from localhost. You need to modify the conf file. Quick search on this forum or the internet for mosquito 2 binding will reveal the answer.

PS you do only have one broker right?

Thanks Steve..
Just added 1 broker..
and added allow_anonyous true and , 'wola' all worked.. at least message worked. now need to configure security.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.