frigate: [Support]: frigate.comms.mqtt: Unable to publish to stats: client is not connected

Describe the problem you are having

I am running Frigate in Docker Compose, alongside Mosquitto and go2rpc. Frigate refuses to connect to the MQTT with the following error message in logs:

2023-10-06 16:18:46.708048635  [2023-10-06 16:18:46] frigate.comms.mqtt             ERROR   : Unable to publish to Outdoor/all: client is not connected
2023-10-06 16:19:27.333091671  [2023-10-06 16:19:27] frigate.comms.mqtt             ERROR   : Unable to publish to Outdoor/motion: client is not connected
2023-10-06 16:19:58.057959711  [2023-10-06 16:19:58] frigate.comms.mqtt             ERROR   : Unable to publish to stats: client is not connected

I have verified that I can indeed connect from Frigate container to Mosquitto and publish messages there like this:

root@bi2:/opt/frigate# mosquitto_pub -h myhostname  -p 1883 -t Hello -m World

I tried replacing myhostname in Frigate config to IP address of the host, IP address of the container as well as 127.0.0.1. I have also tried to run another MQTT server not in docker (neither require authentication and both allow anonymous posters). At this point I’m at my wit’s end as per what to do.

Version

0.12.1-367D724

Frigate config file

mqtt:
  host: myhostname
  port: 1883
logger:
  default: info
  logs:
    frigate.mqtt: debug
cameras:
  Outdoor:
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://myhostname:18554/Outdoor
          input_args: preset-rtsp-restream
          roles:
            - detect
            - record
    record:
      enabled: True
      events:
        retain:
          default: 100
          mode: motion
    detect:
      enabled: True
      width: 640
      height: 480
      fps: 10

detectors:
  coral:
    type: edgetpu
    device: usb  

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

Relevant log output

2023-10-06 16:18:46.708048635  [2023-10-06 16:18:46] frigate.comms.mqtt             ERROR   : Unable to publish to Outdoor/all: client is not connected
2023-10-06 16:19:27.333091671  [2023-10-06 16:19:27] frigate.comms.mqtt             ERROR   : Unable to publish to Outdoor/motion: client is not connected
2023-10-06 16:19:58.057959711  [2023-10-06 16:19:58] frigate.comms.mqtt             ERROR   : Unable to publish to stats: client is not connected

FFprobe output from your camera

N/A

Frigate stats

{"Outdoor":{"camera_fps":10.0,"capture_pid":306,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":310,"pid":304,"process_fps":10.0,"skipped_fps":0.0},"cpu_usages":{"%Cpu(s):":{"cpu":"id,","mem":"0.2"},"1":{"cpu":"0.0","mem":"0.0"},"109":{"cpu":"0.0","mem":"0.0"},"112":{"cpu":"1.3","mem":"3.1"},"116":{"cpu":"0.0","mem":"0.2"},"134":{"cpu":"0.0","mem":"0.1"},"135":{"cpu":"0.0","mem":"0.1"},"136":{"cpu":"0.0","mem":"0.1"},"137":{"cpu":"0.0","mem":"0.1"},"15":{"cpu":"0.0","mem":"0.0"},"16":{"cpu":"0.0","mem":"0.0"},"24":{"cpu":"0.0","mem":"0.0"},"25":{"cpu":"0.0","mem":"0.0"},"26":{"cpu":"0.0","mem":"0.0"},"27":{"cpu":"0.0","mem":"0.0"},"28":{"cpu":"0.0","mem":"0.0"},"281":{"cpu":"0.0","mem":"1.0"},"29":{"cpu":"0.0","mem":"0.0"},"295":{"cpu":"0.3","mem":"0.1"},"296":{"cpu":"0.0","mem":"1.3"},"298":{"cpu":"1.3","mem":"1.1"},"30":{"cpu":"0.0","mem":"0.0"},"304":{"cpu":"2.3","mem":"1.2"},"305":{"cpu":"0.0","mem":"0.2"},"306":{"cpu":"3.0","mem":"1.1"},"31":{"cpu":"0.0","mem":"0.0"},"310":{"cpu":"8.0","mem":"0.9"},"312":{"cpu":"0.0","mem":"0.2"},"32":{"cpu":"0.0","mem":"0.0"},"41":{"cpu":"0.0","mem":"0.0"},"42":{"cpu":"0.3","mem":"0.0"},"4861":{"cpu":"0.0","mem":"0.0"},"4934":{"cpu":"0.0","mem":"0.0"},"80":{"cpu":"0.0","mem":"0.0"},"81":{"cpu":"0.0","mem":"0.0"},"82":{"cpu":"0.0","mem":"0.0"},"847":{"cpu":"0.0","mem":"0.0"},"MiB":{"cpu":"5589.9","mem":"avail"},"PID":{"cpu":"%CPU","mem":"%MEM"},"Tasks:":{"cpu":"stopped,","mem":"0"},"top":{"cpu":"users,","mem":"load"}},"detection_fps":0.0,"detectors":{"coral":{"detection_start":0.0,"inference_speed":11.74,"pid":296}},"gpu_usages":{"intel-vaapi":{"gpu":"5.84 %","mem":"- %"}},"service":{"last_updated":1696606083,"latest_version":"0.12.1","storage":{"/dev/shm":{"free":65.8,"mount_type":"tmpfs","total":67.1,"used":1.3},"/media/frigate/clips":{"free":1958742.8,"mount_type":"fuseblk","total":8001545.0,"used":6042802.3},"/media/frigate/recordings":{"free":1958742.8,"mount_type":"fuseblk","total":8001545.0,"used":6042802.3},"/tmp/cache":{"free":995.5,"mount_type":"tmpfs","total":1000.0,"used":4.5}},"temperatures":{},"uptime":559,"version":"0.12.1-367d724"}}

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Reolink

Any other information that may be helpful

Recreating Docker container doesn’t help

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27

Most upvoted comments

In my case, in the frigate configuration yaml, removing the :1883 in the "host: " solved the problem.