blakeblackshear / frigate

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

[Config Support]: how to solve this error please? #6064

Closed luciandf closed 1 year ago

luciandf commented 1 year ago

Describe the problem you are having

I keep getting the error below in the description. I am completely new at this docker (I am using Portainer because I am trying to follow a tutorial I found here: https://github.com/blakeblackshear/frigate/files/9737633/Installing.frigate.from.scratch.pdf) and frigate. I feel like I am close but this error doesn't tell me anything and have no idea where to look. When I start the container I get a webpage but I get a loading circle and then an error unable to connect.

Can anyone help me figure this out please?

Version

0.11.1

Frigate config file

mqtt:
  host: 192.168.1.67
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: SECRET
  password: MORE SECRET
  stats_interval: 60

detectors:
  coral:
    type: edgetpu

database:
  path: /home/lucian/frigate/db/frigate.db

logger:
  default: info
  logs:
    frigate.event: debug

ffmpeg:
  global_args: -hide_banner -loglevel warning -threads 2
  hwaccel_args: []
  input_args: preset-rtsp-generic
  output_args:
    detect: -threads 2 -f rawvideo -pix_fmt yuv420p
    record: preset-record-generic
    rtmp: preset-rtmp-generic

detect:
  width: 1280
  height: 720
  fps: 5
  max_disappeared: 25
  stationary:
    interval: 0
    threshold: 50
    max_frames:
      default: 3000
      objects:
        person: 1000

objects:
  track:
    - person
  mask: 0,0,1000,0,1000,200,0,200
  filters:
    person:
      min_area: 5000
      max_area: 100000
      min_ratio: 0.5
      max_ratio: 2.0
      min_score: 0.5
      threshold: 0.7
      mask: 0,0,1000,0,1000,200,0,200

motion:
  threshold: 25
  contour_area: 30
  delta_alpha: 0.2
  frame_alpha: 0.2
  frame_height: 50
  mask: 0,900,1080,900,1080,1920,0,1920
  improve_contrast: False
  mqtt_off_delay: 30

record:
  expire_interval: 60
  retain:
    days: 14
    mode: motion
  events:
    pre_capture: 5
    post_capture: 5
    objects:
      - person
    required_zones: []
    retain:
      default: 10
      mode: motion
      objects:
        person: 15

snapshots:
  clean_copy: True
  timestamp: False
  bounding_box: False
  crop: False
  height: 175
  required_zones: []
  retain:
    default: 10
    objects:
      person: 15

timestamp_style:
  position: "tl"
  format: "%m/%d/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  effect: "solid"

cameras:
  gate:
    ffmpeg:
      inputs:
        - path: rtsp://admin:ANOTHERSECRET@192.168.1.85:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
          roles:
            - detect
            - record
            - rtmp
    best_image_timeout: 60

    zones:
      front_steps:
        coordinates: 545,1077,747,939,788,805
        objects:
          - person
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.7

    mqtt:
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 70
      required_zones: []

    ui:
      order: 0
      dashboard: True
  veranda:
    ffmpeg:
      inputs:
        - path: rtsp://admin:ANOTHERSECRET@192.168.1.94:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
          roles:
            - detect
            - record
            - rtmp
    best_image_timeout: 60

    zones:
      front_steps:
        coordinates: 545,1077,747,939,788,805
        objects:
          - person
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.7

    mqtt:
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 70
      required_zones: []

    ui:
      order: 0
      dashboard: True

telemetry:
  version_check: True

Relevant log output

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] done.

[services.d] starting services

[services.d] done.

[2023-04-14 03:13:07] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)

*************************************************************

*************************************************************

***    Your config file is not valid!                     ***

***    Please check the docs at                           ***

***    https://docs.frigate.video/configuration/index     ***

*************************************************************

*************************************************************

***    Config Validation Errors                           ***

*************************************************************

1 validation error for FrigateConfig

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

PCIe

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

you need to provide the full error log, that is not all of it

luciandf commented 1 year ago

you need to provide the full error log, that is not all of it

This is all I see when I start the container from portainer web interface. I will try to download the log and see if it is different.

luciandf commented 1 year ago

you need to provide the full error log, that is not all of it

Here is the downloaded log:

  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
      
y
  extra fields not permitted (type=value_error.extra)
*************************************************************
***    End Config Validation Errors                       ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-04-14 10:00:05] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
*************************************************************
*************************************************************
***    Your config file is not valid!                     ***
***    Please check the docs at                           ***
***    https://docs.frigate.video/configuration/index     ***
*************************************************************
*************************************************************
***    Config Validation Errors                           ***
*************************************************************
1 validation error for FrigateConfig
      
y
  extra fields not permitted (type=value_error.extra)
Traceback (most recent call last):
  File "/opt/frigate/frigate/app.py", line 332, in start
    self.init_config()
  File "/opt/frigate/frigate/app.py", line 82, in init_config
    user_config = FrigateConfig.parse_file(config_file)
  File "/opt/frigate/frigate/config.py", line 942, in parse_file
    return cls.parse_obj(config)
  File "pydantic/main.py", line 521, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
      
y
  extra fields not permitted (type=value_error.extra)
*************************************************************
***    End Config Validation Errors                       ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-04-14 10:01:11] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
*************************************************************
*************************************************************
***    Your config file is not valid!                     ***
***    Please check the docs at                           ***
***    https://docs.frigate.video/configuration/index     ***
*************************************************************
*************************************************************
***    Config Validation Errors                           ***
*************************************************************
1 validation error for FrigateConfig
      
y
  extra fields not permitted (type=value_error.extra)
Traceback (most recent call last):
  File "/opt/frigate/frigate/app.py", line 332, in start
    self.init_config()
  File "/opt/frigate/frigate/app.py", line 82, in init_config
    user_config = FrigateConfig.parse_file(config_file)
  File "/opt/frigate/frigate/config.py", line 942, in parse_file
    return cls.parse_obj(config)
  File "pydantic/main.py", line 521, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
      
y
  extra fields not permitted (type=value_error.extra)
*************************************************************
***    End Config Validation Errors                       ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
NickM-27 commented 1 year ago

Looks like there's a stray bad character in there. I'd start back with a basic config adding little parts back until it's obvious which one is the problem.

Also, just in general it looks like you may have copied the reference config in the docs which isn't recommended.

luciandf commented 1 year ago

Yes unfortunately I have no clue what I am doing... and I did start from there. what is it that I should take out? is there a default working example that works which can then be modified and optimised?

On Fri, Apr 14, 2023, 14:48 Nicolas Mowen @.***> wrote:

Looks like there's a stray bad character in there. I'd start back with a basic config adding little parts back until it's obvious which one is the problem.

Also, just in general it looks like you may have copied the reference config in the docs which isn't recommended.

— Reply to this email directly, view it on GitHub https://github.com/blakeblackshear/frigate/issues/6064#issuecomment-1508384374, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPYBOCLLWJ5JZIDMSA26PLXBE2QJANCNFSM6AAAAAAW5YCNU4 . You are receiving this because you authored the thread.Message ID: @.***>

blakeblackshear commented 1 year ago

That guide is referencing an older version. The latest version has a built in config editor with validation. You are also likely to run into issues where the official documentation is out of sync with the version you are running. I would follow the guides in the docs.

https://docs.frigate.video/frigate/installation https://docs.frigate.video/guides/getting_started

luciandf commented 1 year ago

super. ok I will start again with that. so basically will edit only the config.yml not the container yml

On Fri, Apr 14, 2023, 15:07 Blake Blackshear @.***> wrote:

That guide is referencing an older version. The latest version has a built in config editor with validation. You are also likely to run into issues where the official documentation is out of sync with the version you are running. I would follow the guides in the docs.

https://docs.frigate.video/frigate/installation https://docs.frigate.video/guides/getting_started

— Reply to this email directly, view it on GitHub https://github.com/blakeblackshear/frigate/issues/6064#issuecomment-1508405713, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPYBOGX5HT3G5IDQWLHDXLXBE4YHANCNFSM6AAAAAAW5YCNU4 . You are receiving this because you authored the thread.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

luciandf commented 1 year ago

i got it working now, thank you! i am not sure if hardware acceleration is working though

NickM-27 commented 1 year ago

What's your current config?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.