Chirpstack V4 Unable to Connect to Chirpstack Gateway Bridge

I have a Heltec M02_V2 gateway that I have been attempting to configure Chirpstack Gateway Bridge as well as Chirpstack V4 on.

Currently, I am running Chirpstack Version: 4.7.0 and Chirpstack Gateway Bridge Version: 4.0.11. Chirpstack Gateway Bridge appears to be operating just fine; The log file shows that it publishes both uplink frames as well as gateway statistics as expected. However, the Chirpstack server I am running on the gateway fails to connect to the Gateway Bridge and shows that the gateway was “Never Seen.”
ERROR chirpstack::gateway::backend::mqtt: MQTT error error=I/O: connection closed by peer
ERROR chirpstack::integration::mqtt: MQTT error error=I/O: connection closed by peer

Has anyone observed this before?

It looks like ChirpStack is unable to connect to your MQTT server. This could be for many reasons, including service not running, ports not exposed/accessible, or more recently issues with the MQTT v5 protocol. I would verify you can connect to MQTT successfully with a client.

hi, how do you fix the problem?
I have similar issue with the system that worked perfectly earlier but after running “apt-get upgrade”, chirpstack doesn’t work anymore.
I decided to remove / purge everything: mosquitto \ mosquitto-clients \redis-server \redis-tools \PostgreSQL\chirpstack-gateway-bridge & chirpstack & reinstall the chirpstack again like new.

After reinstalling, I can see gateway data (using mosquitto-sub or check status with systemctl):
Apr 30 14:31:57 raspberrypi chirpstack-gateway-bridge[30698]: time=“2024-04-30T14:31:57.781092822-03:00” level=info msg=“integration/mqtt: publishing event” event=up qos=0 topic=us915_0/gateway/a84041ffff21c16c/event/up uplink_id=41318

But the chirpstack status still has errors:
Apr 30 14:23:15 raspberrypi chirpstack[2360]: 2024-04-30T17:23:15.676202Z ERROR chirpstack::gateway::backend::mqtt: MQTT error error=I/O: connection closed by peer

Apr 30 14:23:15 raspberrypi chirpstack[2360]: 2024-04-30T17:23:15.707854Z ERROR chirpstack::gateway::backend::mqtt: MQTT error error=I/O: connection closed by peer

I’m seeking help from the community. Thanks.