docker-recorder icon indicating copy to clipboard operation
docker-recorder copied to clipboard

owntracks + traefik reverse proxy: connecting to MQTT on owntracks-mosquitto:1883 as clientID ot-recorder-f731dce6c941-7 without TLS Error: Connection refused

Open deimjons opened this issue 3 months ago • 1 comments

Hello. I trying to setup owntracks with docker-compose and traefik. version: '3.9' services: owntracks: image: owntracks/recorder:latest container_name: owntracks depends_on: - owntracks-mosquitto labels: traefik.enable: true traefik.docker.network: traefik

  traefik.http.routers.owntracks-http.rule: Host(`owntracks.example.com`)
  traefik.http.routers.owntracks-http.entrypoints: web
  traefik.http.routers.owntracks-http.middlewares: https-redirect

  traefik.http.routers.owntracks-https.rule: Host(`owntracks.example.com`)
  traefik.http.routers.owntracks-https.entrypoints: websecure
  traefik.http.routers.owntracks-https.tls: true
  traefik.http.routers.owntracks-https.tls.certresolver: prod
environment:
  OTR_HOST: owntracks-mosquitto
  OTR_PORT: 1883
volumes:
  - store:/store
  - config:/config
networks:
  - traefik
  - owntracks
# ports:
#   - 8083:8083

owntracks-mosquitto: image: eclipse-mosquitto container_name: owntracks-mosquitto restart: unless-stopped volumes: - mosquitto-data:/mosquitto/data - mosquitto-logs:/mosquitto/logs - mosquitto-conf:/mosquitto/config networks: - owntracks # ports: # - 1883:1883 # - 8883:8883

volumes: store: driver: local driver_opts: type: none o: bind device: $VOLUMES_PATH_PREFIX/owntracks/volumes/store config: driver: local driver_opts: type: none o: bind device: $VOLUMES_PATH_PREFIX/owntracks/volumes/config mosquitto-data: driver: local driver_opts: type: none o: bind device: $VOLUMES_PATH_PREFIX/owntracks/volumes/mosquitto-data mosquitto-logs: driver: local driver_opts: type: none o: bind device: $VOLUMES_PATH_PREFIX/owntracks/volumes/mosquitto-logs mosquitto-conf: driver: local driver_opts: type: none o: bind device: $VOLUMES_PATH_PREFIX/owntracks/volumes/mosquitto-conf

networks: traefik: external: true owntracks: name: owntracks

When I run compose file container creates but fall after run and I got error in logs of container:

connecting to MQTT on owntracks-mosquitto:1883 as clientID ot-recorder-f731dce6c941-7 without TLS Error: Connection refused

I do not change any other settings.. what I doing wrong??

deimjons avatar Mar 26 '24 00:03 deimjons