MQTT error --- looking for ideas to resolve?

Hoping someone can point me to something to try as I am out of ideas?

I am receiving the following error from docker logs chirpstack:

2024-08-11T17:05:20.211771Z ERROR chirpstack::integration::mqtt: MQTT error error=I/O: failed to lookup address information: Name does not resolve

A few points:

  1. .env file lives at level of docker-compose.yml. A docker inspect of chirpstack reveals that chirpstack indeed sees the environment variables as expected.
  2. With two ssh terminals I tested that the virtual port of 183 can subscribe and see messages from system port 1883 publishing.
  3. The same mechanism with postgresql works (see snippet below from chirpstack.toml) as I can log into my database and see the tables chirpstack has created.
  4. Finally all other logs are clean on redis, postgresql, mosquitto, HaSS, gateway.

Here is my setup:
docker-compose.yml

services:
  chirpstack:
    container_name: network_app_server
    image: chirpstack/chirpstack:4
    command: -c /etc/chirpstack
    restart: unless-stopped
    volumes:
      - ./configuration/chirpstack:/etc/chirpstack
    depends_on:
      - postgres
      - mosquitto
      - redis
    environment:
      - MQTT_BROKER_HOST=mosquitto
      - REDIS_HOST=redis
    env_file:
      - .env
    ports:
      - 8080:8080

  mosquitto:
    container_name: broker
    image: eclipse-mosquitto:2
    restart: unless-stopped
    ports:
      - 1883:183  # chirpStack
    volumes:
      - ./configuration/mosquitto/config/:/mosquitto/config/
      - ./containers/mosquitto/data:/mosquitto/data
      - ./containers/mosquitto/log:/mosquitto/log
      - ./containers/mosquitto/certs:/mosquitto/certs
    env_file:
      - .env

chirpstack.toml (location relative to docker yaml ./configuration/chirpstack/)

[integration]
  enabled = ["mqtt", "postgresql"]

  [integration.mqtt]
    server = "tcp://${MQTT_BROKER_HOST}:183/"
    json = true

  [integration.postgresql]
    dsn="postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRESQL_HOST/$POSTGRES_DB?sslmode=disable"

mosquitto.conf (location relative to docker yaml ./configuration/mosquitto/config/)

listener 183
#password_file ../../../.env
allow_anonymous true

Thank you
Steve

1 Like

Did you ever manage to work out the problem?