Unable to listen to MQTT topic

Hi,

I am new to n8n and trying to use MQTT trigger node to get the messages on an MQTT topic. I am getting the below issue while trying to execute the node. Both n8n and MQTT are running as docker containers.

I tried other MQTT clients and I am able to get the data in them. I think is it an issue with n8n docker networking, are there other ways to configure n8n docker container networking ?

Hey @yogeshmpandey,

I suspect the issue is that you don’t have your MQTT instance on the docker image for n8n so so the local host IP is failing.

What you will need to do is get the ip of your other container and use that or if you have your host machine listening on that port try setting the IP for the connection to 172.17.0.1 and see if that works.

2 Likes

Thanks, @Jon, With docker default networking it worked, maybe I need to further debug on setting up the right IPs for my containers.

1 Like

To be honest I still need to look at the networking side but if I have a service passed through or running on my host machine I just use the 172.17.0.1 address and all is good.