Can't detect Rpi in virtual machine when trying to connect to a mosquitto broker


New Member
Jun 6, 2022
Reaction score
I am setting up a MQTT architecture in my local network whose broker and one client are on a Rpi and another client is on a Parrot OS virtual machine (VM) located in a PC.

The broker and the client of the Rpi work properly but when I try to connect the VM to the Rpi's broker by mosquitto_pub -h RpiIP -t mytopic -q 0 -m try, I get the following error:

Error: No route to host
In the VM I have set up a NAT adapter and a Host-only Adapter with the static IP address and the Rpi has the static IP

I have also tried to do a nmap of the VM' static IP address in the Rpi and a nmap of the Rpi's IP address in the VM and in both cases it doesn't detect any device in both IP addresses.

I think the problem is related to the IP addresses of both the Rpi and the VM.

MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit:

Members online

Latest posts