I’m currently working on connecting a RAK7289 gateway to ThingsBoard using Docker on Pop!_OS, following the official ThingsBoard tutorial for adding a gateway. I have two Docker containers running: one for ThingsBoard and another for the MQTT broker (using the image thingsboard/tb-gw-mqtt-broker:latest).
The problem I’m encountering is related to port configuration, and I’m unclear about how these ports should be set up. In ThingsBoard, there are two places to configure ports:
General device configuration: Where I set the port for the device itself.
Connector configuration: Where I set the connection details for the MQTT broker.
Could someone help clarify which ports should be used where, and why different ports might be required in these two settings?
To run the MQTT broker container, I use the command:
docker run -it -p 1884:1884 thingsboard/tb-gw-mqtt-broker:latest
However, I encountered issues where the gateway container refused to connect to ThingsBoard. I managed to get it working only after disabling the firewall, but I’m still not sure why this is necessary. Also, I tried using host.docker.internal for the connection, but it didn’t work, and I had to use an Ethernet cable to define a specific IP.
What is the best way to connect the RAK7289 gateway to ThingsBoard using MQTT? How should I configure the ports for optimal communication, and why is disabling the firewall required in my case?
Any advice or clarification about the role of ports in this setup and the connection process would be greatly appreciated!