Hi I’m installing ChirpStack using the below docker compose:
services:
chirpstack:
image: chirpstack/chirpstack:4
command: -c /etc/chirpstack
restart: unless-stopped
volumes:
- /volume8/docker/chirpstack/config:/etc/chirpstack
depends_on:
- postgres
environment:
- REDIS_HOST=192.168.xxx.xxx
- REDIS_PORT=xxx
- POSTGRESQL_HOST=postgres
- LOG_LEVEL=DEBUG
ports:
- "8080:8080"
networks:
- docker_network
chirpstack-gateway-bridge-basicstation:
image: chirpstack/chirpstack-gateway-bridge:4
restart: unless-stopped
command: -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge-basicstation-eu868.toml
ports:
- "3001:3001"
volumes:
- /volume8/docker/chirpstack/chirpstack-gateway-bridge/basicstation:/etc/chirpstack-gateway-bridge
networks:
- docker_network
postgres:
...........
...........
...........
networks:
docker_network:
external: true
and these are the .toml configuration related to mqtt services:
chirpstack.toml
…
…
Configurazione BACKEND del gateway (obbligatoria)
[gateway.backend]
backend = “mqtt”
[gateway.backend.mqtt]
server = “tcp://mosquitto:1883”
client_id = “chirpstack_gateway_backend”
Aggiungere TEMPLATE per i topic (obbligatorio)
event_topic_template = “eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}”
state_topic_template = “eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}”
command_topic_template = “eu868/gateway/{{ .GatewayID }}/command/#”
Configurazione INTEGRAZIONE (opzionale)
[integration]
enabled = [“mqtt”]
[integration.mqtt]
server = “tcp://mosquitto:1883”
client_id = “chirpstack_integration”
json = true
event_topic_template = “application/{{application_id}}/device/{{dev_eui}}/event/{{event}}” # Template standard
command_topic_template = “application/{{application_id}}/device/{{dev_eui}}/command/{{command}}” # Template standard
chirpstack-gateway-bridge-basicstation-eu868.toml
…
…
…
[integration.mqtt.auth.generic]
server = “tcp://192.168.5.10:1773”
client_id = “chirpstack_bridge_basicstation”
username = “”
password = “”
[integration.mqtt]
event_topic_template=“eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}”
state_topic_template=“eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}”
command_topic_template=“eu868/gateway/{{ .GatewayID }}/command/#”
I am encountering a persistent “Connection refused” error within my ChirpStack container. The specific log entry is:
chirpstack::gateway::backend::mqtt: MQTT error, error: I/O: Connection refused (os error 111)
I’m using EMQX as my MQTT broker and everything is working well except the above error. In the EMQX dashboard, I can see two clients connected: chirpstack_integration and chirpstack_bridge_basicstation. However, I cannot see the chirpstack_gateway_backend client, which seems to be the one generating these errors.