blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18k stars 1.64k forks source link

[Support]: Frigate doesn‘t start anymore after upgrading to 0.13.0 #9510

Closed Jensilein closed 7 months ago

Jensilein commented 7 months ago

Describe the problem you are having

Hello, I upgraded to 0.13.0 but Frigate doesn‘t start anymore since. Any idea how to solve it?

Version

0.13.0

Frigate config file

#yaml-language-server: $schema=http://ccab4aaf-frigate-fa:5000/api/config/schema.json

mqtt:  
 host: 192.168.178.40
 user:
 password:

database:
  path: /config/frigate.db

detectors:
  coral:
    type: edgetpu
    device: usb
    #model:
    #  path: "/custom_model.tflite"

birdseye:
  enabled: True
  width: 640
  height: 360
  quality: 8
  mode: continuous

snapshots:
  enabled: True
  clean_copy: True
  timestamp: False
  bounding_box: True
  retain:
    default: 21
    objects:
      person: 30

record:
  enabled: True
  expire_interval: 60
  retain:
    days: 0
    mode: all
  events:
    pre_capture: 5
    post_capture: 5
    retain:
      default: 21
      mode: all

detect:
  enabled: True
  width: 640
  height: 360
  stationary:
    interval: 0
    threshold: 50

cameras:
  01_Einfahrt:
    ffmpeg:
      hwaccel_args: preset-rpi-64-h264
      inputs:
        - path: rtsp://admin:xxxxxx@192.168.178.210:554/h264Preview_01_sub
          roles: 
            - detect

        - path: rtsp://admin:xxxxxx@192.168.178.210:554/h265Preview_01_main
          roles:
            - record

    motion:
      mask: "0,360,0,0,186,0,67,119,171,360"

    objects:
      track:
      - person
      - car
      - dog
      - cat
      - bicycle

    zones:
      einfahrt:
        coordinates: 508,21,191,0,83,123,136,249,174,360,640,360,640,48
        filters:
          person:
            min_area: 80000
          dog:
            min_area: 5000
          cat:
            min_area: 5000

  02_Hauseingang:
    ffmpeg:
      hwaccel_args: preset-rpi-64-h264
      inputs:
        - path: rtsp://admin:xxxxxx@192.168.178.211:554/h264Preview_01_sub
          roles: 
            - detect

        - path: rtsp://admin:xxxxxx@192.168.178.211:554/h265Preview_01_main
          roles:
            - record

    motion:
      mask: "0,0,0,176,188,90,183,0"

    objects:
      track:
      - person
      - car
      - dog
      - cat
      - bicycle

    record:
      events:
        required_zones:
          - zone_1
          - zone_2

    snapshots:
     required_zones:
       - zone_1
       - zone_2

    zones:
     zone_1:
      coordinates: 381,312,464,130,192,87,0,177
      objects:
       - person
       - dog
       - cat
       - bicycle
      filters:
        person:
          min_area: 80000
        dog:
          min_area: 5000
        cat:
          min_area: 5000

     zone_2:
      coordinates: 0,186,0,360,360,360,382,318
      objects:
       - person
       - car
       - dog
       - cat
       - bicycle

  03_Durchgang:
    ffmpeg:
      hwaccel_args: preset-rpi-64-h264
      inputs:
        - path: rtsp://admin:xxxxxx@192.168.178.212:554/h264Preview_01_sub
          roles: 
            - detect

        - path: rtsp://admin:xxxxxx@192.168.178.212:554/h265Preview_01_main
          roles:
            - record

    motion:
      mask:
      - 252,360,248,322,233,268,199,213,169,216,154,308,159,360
      - 413,0,405,42,340,47,447,171,395,311,350,329,366,360,640,360,640,0
      - 341,197,388,309,442,164,360,86

    objects:
      track:
      - person
      - dog
      - cat

    zones:
      durchgang:
        coordinates: 61,0,135,360,149,360,165,220,201,210,231,256,262,360,396,331,326,186,348,0
        filters:
          person:
            min_area: 80000
          dog:
            min_area: 5000
          cat:
            min_area: 5000

  04_Nordseite:
    ffmpeg:
      hwaccel_args: preset-rpi-64-h264
      inputs:
        - path: rtsp://admin:xxxxxx@192.168.178.213:554/h264Preview_01_sub
          roles: 
            - detect

        - path: rtsp://admin:xxxxxx@192.168.178.213:554/h265Preview_01_main
          roles:
            - record

    motion:
      mask:
      - 0,0,0,360,363,360,503,0
    #  - 409,0,407,46,533,162,465,301,361,333,366,360,640,360,640,0
    #  - 341,197,390,289,419,231,349,141

    objects:
      track:
      - person
      - dog
      - cat

    zones:
      nordseite:
        coordinates: 558,152,549,297,580,297,570,360,374,360,498,0,549,0
        filters:
          person:
            min_area: 80000
          dog:
            min_area: 5000
          cat:
            min_area: 5000

Relevant log output

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 s6rc-fdholder successfully started
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 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
s6-rc: info: service go2rtc-healthcheck successfully started
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
2024-01-31 07:46:55.990376220  [INFO] Preparing Frigate...
2024-01-31 07:46:55.997685299  [INFO] Starting NGINX...
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2024-01-31 07:46:56.320126705  [INFO] Preparing new go2rtc config...
2024-01-31 07:46:56.349183894  [INFO] Starting Frigate...
2024-01-31 07:46:56.461081471  [INFO] Got IP address from supervisor: 192.168.178.77
2024-01-31 07:46:56.603622714  [INFO] Got WebRTC port from supervisor: 8555
2024-01-31 07:46:57.730607971  [INFO] Starting go2rtc...
2024-01-31 07:46:57.933136159  08:46:57.932 INF go2rtc version 1.8.4 linux/arm64
2024-01-31 07:46:57.935957452  08:46:57.935 INF [api] listen addr=:1984
2024-01-31 07:46:57.936249022  08:46:57.936 INF [rtsp] listen addr=:8554
2024-01-31 07:46:57.937881609  08:46:57.937 INF [webrtc] listen addr=:8555
2024-01-31 07:46:58.595627635  2024/01/31 08:46:58 [error] 142#142: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.1, server: , request: "GET /api/stats HTTP/1.1", upstream: "http://127.0.0.1:5001stats", host: "ccab4aaf-frigate-fa:5000"
2024-01-31 07:47:01.719468487  [2024-01-31 08:47:01] frigate.app                    INFO    : Starting Frigate (0.13.0-01e2d20)
2024-01-31 07:47:01.720316827  [2024-01-31 08:47:01] frigate.app                    INFO    : Creating directory: /tmp/cache
2024-01-31 07:47:01.800668644  *************************************************************
2024-01-31 07:47:01.800679570  *************************************************************
2024-01-31 07:47:01.800690440  ***    Your config file is not valid!                     ***
2024-01-31 07:47:01.800868178  ***    Please check the docs at                           ***
2024-01-31 07:47:01.800873456  ***    https://docs.frigate.video/configuration/index     ***
2024-01-31 07:47:01.800875548  *************************************************************
2024-01-31 07:47:01.800877530  *************************************************************
2024-01-31 07:47:01.800880196  ***    Config Validation Errors                           ***
2024-01-31 07:47:01.800965306  *************************************************************
2024-01-31 07:47:01.801324134  1 validation error for FrigateConfig
2024-01-31 07:47:01.801332208  detect -> stationary -> interval
2024-01-31 07:47:01.801334653    ensure this value is greater than 0 (type=value_error.number.not_gt; limit_value=0)
2024-01-31 07:47:01.805665720  Traceback (most recent call last):
2024-01-31 07:47:01.805678293    File "/opt/frigate/frigate/app.py", line 645, in start
2024-01-31 07:47:01.805679719      self.init_config()
2024-01-31 07:47:01.805681701    File "/opt/frigate/frigate/app.py", line 112, in init_config
2024-01-31 07:47:01.805683516      user_config = FrigateConfig.parse_file(config_file)
2024-01-31 07:47:01.805685497    File "/opt/frigate/frigate/config.py", line 1333, in parse_file
2024-01-31 07:47:01.805686997      return cls.parse_obj(config)
2024-01-31 07:47:01.805689349    File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 526, in parse_obj
2024-01-31 07:47:01.805704460      return cls(**obj)
2024-01-31 07:47:01.805706793    File "/usr/local/lib/python3.9/dist-packages/pydantic/main.py", line 341, in __init__
2024-01-31 07:47:01.805708682      raise validation_error
2024-01-31 07:47:01.805710867  pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
2024-01-31 07:47:01.805841958  detect -> stationary -> interval
2024-01-31 07:47:01.805846291    ensure this value is greater than 0 (type=value_error.number.not_gt; limit_value=0)
2024-01-31 07:47:01.805908661  
2024-01-31 07:47:01.805912994  *************************************************************
2024-01-31 07:47:01.805914938  ***    End Config Validation Errors                       ***
2024-01-31 07:47:01.806102769  *************************************************************
2024-01-31 07:47:03.461850409  [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-01-31 07:47:03.516320436  [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
s6-rc: info: service go2rtc-healthcheck successfully stopped
2024-01-31 07:47:03.577217758  [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-01-31 07:47:03.594784449  exit with signal: terminated
s6-rc: info: service frigate-log successfully stopped
2024-01-31 07:47:03.613294255  [INFO] The go2rtc service exited with code 0 (by signal 0)
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

FFprobe output from your camera

ffprobe command not found

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

Reolink

Any other information that may be helpful

No response

james-fry commented 7 months ago

Having the same issue.

2024-01-31 08:52:29.233023071  *************************************************************
2024-01-31 08:52:29.233026561  *************************************************************
2024-01-31 08:52:29.233031141  ***    Your config file is not valid!                     ***
2024-01-31 08:52:29.233033211  ***    Please check the docs at                           ***
2024-01-31 08:52:29.233034545  ***    https://docs.frigate.video/configuration/index     ***
2024-01-31 08:52:29.233050185  *************************************************************
2024-01-31 08:52:29.233051508  *************************************************************
2024-01-31 08:52:29.233053104  ***    Config Validation Errors                           ***
2024-01-31 08:52:29.233054349  *************************************************************
2024-01-31 08:52:29.233176109  1 validation error for FrigateConfig
2024-01-31 08:52:29.233178451  detect -> stationary -> interval
2024-01-31 08:52:29.233179967    ensure this value is greater than 0 (type=value_error.number.not_gt; limit_value=0)
2024-01-31 08:52:29.233987867  Traceback (most recent call last):
2024-01-31 08:52:29.233990306    File "/opt/frigate/frigate/app.py", line 645, in start
2024-01-31 08:52:29.233991519      self.init_config()
2024-01-31 08:52:29.233992698    File "/opt/frigate/frigate/app.py", line 112, in init_config
2024-01-31 08:52:29.233993857      user_config = FrigateConfig.parse_file(config_file)
2024-01-31 08:52:29.233995019    File "/opt/frigate/frigate/config.py", line 1333, in parse_file
2024-01-31 08:52:29.233996045      return cls.parse_obj(config)
2024-01-31 08:52:29.233997211    File "pydantic/main.py", line 526, in pydantic.main.BaseModel.parse_obj
2024-01-31 08:52:29.233998376    File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
2024-01-31 08:52:29.233999610  pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
2024-01-31 08:52:29.234001826  detect -> stationary -> interval
2024-01-31 08:52:29.234003100    ensure this value is greater than 0 (type=value_error.number.not_gt; limit_value=0)
2024-01-31 08:52:29.234030049  
2024-01-31 08:52:29.234031389  *************************************************************
2024-01-31 08:52:29.234032481  ***    End Config Validation Errors                       ***
2024-01-31 08:52:29.234043517  *************************************************************

I commented out the full stationary config block and frigate starts now.

  # Optional: Configuration for stationary object tracking
  #  stationary:
    # Optional: Frequency for confirming stationary objects (default: shown below)
    # When set to 0, object detection will not confirm stationary objects until movement is detected.
    # If set to 10, object detection will run to confirm the object still exists on every 10th frame.
    #   interval: 10
    # Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
    #    threshold: 50
    # Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
    # This can help with false positives for objects that should only be stationary for a limited amount of time.
    # It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
    # car at the default.
    # WARNING: Setting these values overrides default behavior and disables stationary object tracking.
    #          There are very few situations where you would want it disabled. It is NOT recommended to
    #          copy these values from the example config into your config unless you know they are needed.
    #    max_frames:
      # Optional: Default for all object types (default: not set, track forever)
      #      default: 3000
      # Optional: Object specific values
      #      objects:
      #        person: 1000
dudu7731 commented 7 months ago

see patch notes image

james-fry commented 7 months ago

see patch notes image

Changing interval from 0 to 10 (which is the example value) didnt work for me. I will try it again now the UI loads...

blakeblackshear commented 7 months ago

I would recommend removing it from your config so it will use the default values.

james-fry commented 7 months ago

I would recommend removing it from your config so it will use the default values.

Thank Blake. I deleted my conflicting advice

Jensilein commented 7 months ago

I just set the interval to 50 and it works again. Thanks a lot.