Mosquito Broker IP Address

I have a MQTT broker running on docker container. The log doesn’t show any errors but I can’t get the client to comunícate with the broker. The MQTT explorer works perfect, so I think the broker is working! Could it be that the sensors have an Static IP Address on a different range that the MQTT broker?
MQTT Client: 192.168.100.99
MQTT Broker: 10.211.55.15
This is different because the broker is running on Parallels Desktop VM (Ubuntu Server), and the client is running on the local network thru the router.
Any suggestions? Is it possible to fix this making some changes in the network? For example creating a network bridge? Thanks!!

If your clients don’t find a route to your broker, they can’t connect.

1 Like

Did you test this on the same VM as you run the broker? Does MQTT explorer also work if you are on another machine?

You need a bridged network for your VM. The network modes are explained here. Currently you run “shared networking”.

What you could try as well (don’t know in details how Parallels works,never used it) is to specify the IP of the host machine that runs Parallels asthe MQTT IP that clients will join.

MQTT explorer is running in a different machine. I try to bridge the network from my VM and it works!!! Changing to bridge, the IP Address is in the same segment. Thanks!

Screen Shot 2020-09-06 at 3.28.03 PM