chirpstack / chirpstack-docker

Setup ChirpStack using Docker Compose
https://www.chirpstack.io/
MIT License
273 stars 316 forks source link

chirpstack-gateway-bridge 3226e542433e (Cant find mqtt broker) #74

Closed ccall48 closed 1 year ago

ccall48 commented 1 year ago

gateway bridge not connecting in latest version.

I double checked my configs and even hard coded the gateway bridge mqtt settings and it always tried to connect to localhost:1883 no matter what I set this to ( it should be going to my container as set in settings tcp://mosquitto:1883 for my server). I was pulling hairs trying to get this to work - I ended up dropping back to version 4.0.3 and it connected and worked straight away with exisiting config.

all other services connect fine, just errors with gateway bridge component.

errors with latest gateway-bridge image 3226e542433e

chirpstack-gateway-bridge          | time="2023-01-27T18:16:39.262411168+11:00" level=info msg="starting ChirpStack Gateway Bridge" docs="https://www.chirpstack.io/gateway-bridge/" version=
chirpstack-gateway-bridge          | time="2023-01-27T18:16:39.264080671+11:00" level=info msg="backend/semtechudp: starting gateway udp listener" addr="0.0.0.0:1700"
chirpstack-gateway-bridge          | time="2023-01-27T18:16:39.264853945+11:00" level=error msg="[client]   dial tcp 127.0.0.1:1883: connect: connection refused" module=mqtt
chirpstack-gateway-bridge          | time="2023-01-27T18:16:39.264865505+11:00" level=warning msg="[client]   failed to connect to broker, trying next" module=mqtt
chirpstack-gateway-bridge          | time="2023-01-27T18:16:39.264877316+11:00" level=error msg="[client]   Failed to connect to a broker" module=mqtt
chirpstack-gateway-bridge          | time="2023-01-27T18:16:39.264887116+11:00" level=error msg="integration/mqtt: connection error" error="network Error : dial tcp 127.0.0.1:1883: connect: connection refused"

Screenshot 2023-01-27 at 18 45 20

same config on v4.0.3 - seems to connect fine.

chirpstack-gateway-bridge          | time="2023-01-27T18:32:38.342638139+11:00" level=info msg="starting ChirpStack Gateway Bridge" docs="https://www.chirpstack.io/gateway-bridge/" version=
chirpstack-gateway-bridge          | time="2023-01-27T18:32:38.342738961+11:00" level=info msg="backend/semtechudp: starting gateway udp listener" addr="0.0.0.0:1700"
chirpstack-gateway-bridge          | time="2023-01-27T18:32:38.348002337+11:00" level=warning msg="[store]    memorystore wiped" module=mqtt
chirpstack-gateway-bridge          | time="2023-01-27T18:32:38.348151912+11:00" level=info msg="integration/mqtt: connected to mqtt broker"
chirpstack-gateway-bridge          | time="2023-01-27T18:32:38.649648149+11:00" level=info msg="integration/mqtt: subscribing to topic" qos=0 topic="au915_1/gateway/b827ebfffec9b93e/command/#"
chirpstack-gateway-bridge          | time="2023-01-27T18:32:38.649938978+11:00" level=warning msg="[store]    memorystore del: message 1 not found" module=mqtt
chirpstack-gateway-bridge          | time="2023-01-27T18:32:38.650358492+11:00" level=info msg="integration/mqtt: publishing state" gateway_id=b827ebfffec9b93e qos=0 state=conn topic=au915_1/gateway/b827ebfffec9b93e/state/conn
- - - -
chirpstack-gateway-bridge          | time="2023-01-27T18:35:57.444655082+11:00" level=info msg="integration/mqtt: publishing event" event=up qos=0 topic=au915_1/gateway/60c5a8fffe76fXXXXevent/up uplink_id=21187
chirpstack-gateway-bridge          | time="2023-01-27T18:35:57.447436063+11:00" level=info msg="integration/mqtt: publishing event" event=up qos=0 topic=au915_1/gateway/dca632fffe6aXXXX/event/up uplink_id=16644

Screenshot 2023-01-27 at 18 51 40

urbanskalar commented 1 year ago

I experienced exactly the same issue.

brocaar commented 1 year ago

Thanks for reporting :+1: the above commit fixes this issue.

Edit: A bugfix release is already in the build pipeline (will be v4.0.5).