Frigate won't start

Log

s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service go2rtc-healthcheck: starting
s6-rc: info: service frigate: starting
2024-02-09 14:22:33.665450730  [INFO] Preparing new go2rtc config...
s6-rc: info: service go2rtc-healthcheck successfully started
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
2024-02-09 14:22:33.683579423  [INFO] Preparing Frigate...
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
2024-02-09 14:22:33.702160321  [INFO] Starting NGINX...
2024-02-09 14:22:33.752334555  [INFO] Starting Frigate...
s6-rc: info: service legacy-services successfully started
2024-02-09 14:22:33.816463637  [INFO] Got IP address from supervisor: 192.168.1.53
2024-02-09 14:22:33.908091313  [INFO] Got WebRTC port from supervisor: 8555
2024-02-09 14:22:34.791412615  [INFO] Starting go2rtc...
2024-02-09 14:22:35.081818506  17:22:35.081 INF go2rtc version 1.8.4 linux/amd64
2024-02-09 14:22:35.082680815  17:22:35.082 INF [rtsp] listen addr=:8554
2024-02-09 14:22:35.083109720  17:22:35.083 INF [webrtc] listen addr=:8555
2024-02-09 14:22:35.084127931  17:22:35.084 INF [api] listen addr=:1984
2024-02-09 14:22:37.720797294  [2024-02-09 17:22:37] frigate.app                    INFO    : Starting Frigate (0.13.1-34fb1c2)
2024-02-09 14:22:37.720801294  [2024-02-09 17:22:37] frigate.app                    INFO    : Creating directory: /tmp/cache
2024-02-09 14:22:37.731991413  *************************************************************
2024-02-09 14:22:37.732325016  *************************************************************
2024-02-09 14:22:37.732524418  ***    Your config file is not valid!                     ***
2024-02-09 14:22:37.732679620  ***    Please check the docs at                           ***
2024-02-09 14:22:37.732823222  ***    https://docs.frigate.video/configuration/index     ***
2024-02-09 14:22:37.732965423  *************************************************************
2024-02-09 14:22:37.733109025  *************************************************************
2024-02-09 14:22:37.733253626  ***    Config Validation Errors                           ***
2024-02-09 14:22:37.733496829  *************************************************************
2024-02-09 14:22:37.733658331  'FRIGATE_USER_MQTT'
2024-02-09 14:22:37.734639041  Traceback (most recent call last):
2024-02-09 14:22:37.734643041    File "/opt/frigate/frigate/app.py", line 645, in start
2024-02-09 14:22:37.734644741      self.init_config()
2024-02-09 14:22:37.734646641    File "/opt/frigate/frigate/app.py", line 113, in init_config
2024-02-09 14:22:37.734651841      self.config = user_config.runtime_config(self.plus_api)
2024-02-09 14:22:37.734653941    File "/opt/frigate/frigate/config.py", line 1107, in runtime_config
2024-02-09 14:22:37.734679641      config.mqtt.user = config.mqtt.user.format(**FRIGATE_ENV_VARS)
2024-02-09 14:22:37.734682141  KeyError: 'FRIGATE_USER_MQTT'
2024-02-09 14:22:37.735635852  
2024-02-09 14:22:37.735848354  *************************************************************
2024-02-09 14:22:37.736077356  ***    End Config Validation Errors                       ***
2024-02-09 14:22:37.736271758  *************************************************************
2024-02-09 14:22:39.133407827  [INFO] Service Frigate exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
s6-rc: info: service go2rtc-healthcheck: stopping
2024-02-09 14:22:39.153886145  [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
s6-rc: info: service go2rtc-healthcheck successfully stopped
2024-02-09 14:22:39.161517627  [INFO] Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
s6-rc: info: service nginx-log successfully stopped
2024-02-09 14:22:39.174904169  exit with signal: terminated
2024-02-09 14:22:39.182829953  [INFO] The go2rtc service exited with code 0 (by signal 0)
s6-rc: info: service frigate-log successfully stopped
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

/homeassistant/frigate.yml

mqtt:
  host: core-mosquitto 
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: "{FRIGATE_USER_MQTT}"
  password: "{FRIGATE_PSWD_MQTT}"
  
cameras:
  camdoor: # Gateway
    ffmpeg:
      inputs:
        - path: rtsp://"{FRIGATE_USER_DOOR}":"{FRIGATE_PSWD_DOOR}"@192.168.1.65:554
          roles:
            - detect
            - rtmp
            - audio
  cam2: # Cam2
    ffmpeg:
      inputs:
        - path: rtsp://"{FRIGATE_USER_CAM2}":"{FRIGATE_PSWD_CAM2}"@192.168.1.62:554
          roles:
            - detect
            - audio

Launched without Сam2.
I only added Cam2 and everything broke
where to look for the reason

Check this

And wow! Not sure how in 2 years I didn’t notice the audio role. Definitely using this!

Check without variables and with. Could be the password for camera is causing some issue when loading.

seems like this env var is likely not set correctly

Pretty sure audio detection was added in .13

1 Like

an audio option can be added from the drop-down list.
I removed the variables and everything worked.
How to write variables correctly, what is my mistake?