I am running a Chirpstack Gateway Bridge by means of a Docker image. I have an MQTT broker successfully running. I have tried everything to get the bridge to see the broker, but nothing works. I have tried 127.0.0.1:1883 and 0.0.0.0:1883 with and without ports setting in the YAML configuration. Nothing works. I am shipwrecked and need anyone’s advice to proceed.
[+] Running 1/0
- Container bridge-lora-bridge-1 Created 0.0s
Attaching to bridge-lora-bridge-1
bridge-lora-bridge-1 | INFO[0000] starting ChirpStack Gateway Bridge docs="https://www.chirpstack.io/gateway-bridge/" version=
bridge-lora-bridge-1 | INFO[0000] backend/semtechudp: starting gateway udp listener addr="0.0.0.0:1700"
bridge-lora-bridge-1 | ERRO[0000] [client] dial tcp 127.0.0.1:1883: connect: connection refused module=mqtt
bridge-lora-bridge-1 | WARN[0000] [client] failed to connect to broker, trying next module=mqtt
bridge-lora-bridge-1 | ERRO[0000] [client] Failed to connect to a broker module=mqtt
bridge-lora-bridge-1 | FATA[0000] network Error : dial tcp 127.0.0.1:1883: connect: connection refused
bridge-lora-bridge-1 exited with code 1
My broker is running fine.
1661216750: Saving in-memory database to C:\BROKER\mosquitto\data\mosquitto.db.
1661216753: mosquitto version 2.0.15 starting
1661216753: Config loaded from .\config\mosquitto.conf.
1661216753: Loading plugin: C:\BROKER\mosquitto\mosquitto_dynamic_security.dll
1661216753: Opening ipv4 listen socket on port 1883.
1661216753: mosquitto version 2.0.15 running
Proof that the broker is listening on port 1883
PS C:\BRIDGE> netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 127.0.0.1:1883 0.0.0.0:0 LISTENING ( <---- THERE )
TCP 127.0.0.1:59153 127.0.0.1:59154 ESTABLISHED
TCP 127.0.0.1:59154 127.0.0.1:59153 ESTABLISHED
My mosquitto.conf file is
listener 1883 127.0.0.1
allow_anonymous true
persistence true
persistence_location C:\BROKER\mosquitto\data
plugin C:\BROKER\mosquitto\mosquitto_dynamic_security.dll
plugin_opt_config_file C:\BROKER\mosquitto\data\dynamic-security.json
log_dest file C:\BROKER\mosquitto\log\log.txt
log_type error
log_type warning
log_type notice
log_type information
connection_messages true
The docker-compose.yml follow. As I said before, I have tried this both with and without published ports.
version: "3.6"
services:
lora-bridge:
image: chirpstack/chirpstack-gateway-bridge
stdin_open: true # docker run -i
tty: true # docker run -t
privileged: true
volumes:
- C:\BRIDGE\.config:/etc/chirpstack-gateway-bridge/
ports:
- 1883:1883