Docker setup of mqtt backend failed for only gatewaybridge connecting to 127.0.0.1 instead of mosquitto

Hi

I have referred to other thread for this issue, however for me issue has’nt fixed.

When I spin up docker containers with server versions loraserver 2.6.1, appserver 2.6.0 and gatewaybridge 2.7.1. The loraserver and appserver are happily connecting to tcp mosquitto:1883. However, the gatewaybridge keeps trying to connect to 127.0.0.1 instead of mosquitto.

Now the same setup i installed a week ago on another machine ran fine. So im thinking what is forcing gateway bridge to connect to localhost . No other configurations are changes.
Has anything changed in the complied image?

logs

gatewaybridge_1 | time=“2019-05-22T13:50:01Z” level=info msg=“backend: connecting to mqtt broker” server=“tcp://127.0.0.1:1883”
gatewaybridge_1 | time=“2019-05-22T13:50:01Z” level=error msg=“could not setup mqtt backend, retry in 2 seconds: Network Error : dial tcp 127.0.0.1:1883: connect: connection refused”
gatewaybridge_1 | time=“2019-05-22T13:50:03Z” level=info msg=“backend: set max reconnect interval: 10m0s”
gatewaybridge_1 | time=“2019-05-22T13:50:03Z” level=info msg=“backend: TLS config is empty”

Thanks in advance.

Figured out, Amidst the new changes from v2 to v3 , in case anyone using the older versions
when you are making a fresh install by doing git clone. This will fetch the latest configuration of all .toml files.

So my issue was in gateway-bridge .toml file, I had to use the old config and then the gateway-bridge was connecting to host ‘mosquitto’

2 Likes