blakeblackshear / frigate

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

[Support]: Frigate container on Unraid unable to start. #3283

Closed narayanvs closed 2 years ago

narayanvs commented 2 years ago

Describe the problem you are having

I am new to frigate. Trying to switch from BlueIris. I have Frigate running as a docker CT on Unraid 6.10.2 (stable) with the below config

attached below 

Earlier i was using CPU detection as i didn't have a coral device. And i managed to grab a coral mini PCIE device which is attached to my MSI Z590 A-PRO MB using this pcie adapter

it was running fine for couple of days but then today i noticed the CT not able to start and I see the below error in logs.

attached below 

and my Unraid syslog has something related

May 31 21:54:07 Fusion kernel: x86/PAT: frigate.detecto:1244 map pfn RAM range req uncached-minus for [mem 0x2a60b8000-0x2a60bbfff], got write-back
May 31 21:55:20 Fusion kernel: apex 0000:04:00.0: RAM did not enable within timeout (12000 ms)
May 31 21:55:33 Fusion kernel: apex 0000:04:00.0: RAM did not enable within timeout (12000 ms)
May 31 21:55:33 Fusion kernel: apex 0000:04:00.0: Error in device open cb: -110

Looks like the server is able to see the pcie device

Screenshot 2022-05-31 at 22 15 23

Also, I have the coral driver installed it it says the pcie is shutdown

Screenshot 2022-05-31 at 22 27 41

and lastly, here is my docket config.

Screenshot 2022-05-31 at 22 50 16

Not sure if this is an issue related to Coral or Frigate (or may be my Motherboard/PC hardware in genaral).

Any help will be appreciated.

Version

0.10.1-83481af

Frigate config file

mqtt:
  host: 192.168.10.2
  port: 1883
  user: mqtt-admin
  password: <Removed>

detectors:
  coral_pci:
    type: edgetpu
    device: pci

cameras:

  front:
    ffmpeg:
      inputs:
        - path: rtsp://admin:<Removed>@192.168.2.11:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://admin:<Removed>@192.168.2.11:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - rtmp
        - path: rtsp://admin:<Removed>@192.168.2.11:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    record:
      enabled: true
      retain:
        days: 10
    detect:
      width: 1280
      height: 720
    objects:
      track:
        - person
        - car
        - cat
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 10
    motion:
      mask:
        - 0,371,1280,329,1280,0,0,0
    objects:
      filters:
        person:
          mask:
            - 0,371,1280,329,1280,0,0,0
  parking:
    ffmpeg:
      inputs:
        - path: rtsp://admin:<Removed>@192.168.2.12:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://admin:<Removed>@192.168.2.12:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - rtmp
        - path: rtsp://admin:<Removed>@192.168.2.12:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    record:
      enabled: true
      retain:
        days: 10
    detect:
      width: 1280
      height: 720
    objects:
      track:
        - person
        - car
        - cat
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 10
    zones:
      zone_0:
        coordinates: 1280,720,943,219,413,189,67,720

  patio:
    ffmpeg:
      inputs:
        - path: rtsp://admin:<Removed>@192.168.2.13:554//h264Preview_01_main
          roles:
            - record
        - path: rtsp://admin:<Removed>@192.168.2.13:554//h264Preview_01_sub
          roles:
            - detect
            - rtmp
    record:
      enabled: true
      retain:
        days: 10
    detect:
      width: 640
      height: 480
    objects:
      track:
        - person
        - car
        - cat
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 10

  garden:
    ffmpeg:
      inputs:
        - path: rtsp://admin:<Removed>@192.168.2.14:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://admin:<Removed>@192.168.2.14:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - rtmp
        - path: rtsp://admin:<Removed>@192.168.2.14:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    record:
      enabled: true
      retain:
        days: 10
    detect:
      width: 1280
      height: 720
    objects:
      track:
        - person
        - car
        - cat
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 10

Relevant log output

[2022-05-31 21:54:07] frigate.app                    INFO    : Camera processor started for garden: 253
[2022-05-31 21:54:07] frigate.app                    INFO    : Capture process started for front: 259
[2022-05-31 21:54:07] frigate.app                    INFO    : Capture process started for parking: 266
[2022-05-31 21:54:07] frigate.app                    INFO    : Capture process started for patio: 269
[2022-05-31 21:54:07] frigate.app                    INFO    : Capture process started for garden: 274
[2022-05-31 21:54:07] ws4py                          INFO    : Using epoll
[2022-05-31 21:54:38] frigate.watchdog               INFO    : Detection appears to be stuck. Restarting detection process...
[2022-05-31 21:54:38] root                           INFO    : Waiting for detection process to exit gracefully...
[2022-05-31 21:55:08] root                           INFO    : Detection process didnt exit. Force killing...
[2022-05-31 21:55:20] detector.coral_pci             INFO    : Starting detection process: 575
[2022-05-31 21:55:20] frigate.edgetpu                INFO    : Attempting to load TPU as pci
Process detector:coral_pci:
[2022-05-31 21:55:33] frigate.edgetpu                ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
    raise ValueError(capture.message)
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/edgetpu.py", line 136, in run_detector
    object_detector = LocalObjectDetector(
  File "/opt/frigate/frigate/edgetpu.py", line 44, in __init__
    edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0

[2022-05-31 21:55:40] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[2022-05-31 21:55:40] frigate.video                  ERROR   : patio: Unable to read frames from ffmpeg process.
[2022-05-31 21:55:40] frigate.video                  ERROR   : patio: ffmpeg process is not running. exiting capture thread...
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

** Press ANY KEY to close this window **

FFprobe output from your camera

N/A

Frigate stats

No response

Operating system

UNRAID

Install method

Docker Compose

Coral version

PCIe

Network connection

Wired

Camera make and model

Dahua IPC-T5442TM-AS

Any other information that may be helpful

No response

markmghali commented 2 years ago

ok I will reboot and check c-states, they should be disabled then?

NickM-27 commented 2 years ago

ok I will reboot and check c-states, they should be disabled then?

Yes, don't want any parts of the CPU going to sleep on a server like device

markmghali commented 2 years ago

ok so I set power technology to disabled. I hope that's the correct setting. It then grayed out cpu c-state control.

image

markmghali commented 2 years ago

So frigate was working for awhile but has since stopped due to tpu shutting down here is my unraid syslog. Also it was not due to temps it seems apex error

NickM-27 commented 2 years ago

I would open an issue on the google coral GitHub or the Unraid forums, I can guess what those errors mean but really need someone who knows more about it for sure.

markmghali commented 2 years ago

I would open an issue on the google coral GitHub or the Unraid forums, I can guess what those errors mean but really need someone who knows more about it for sure.

ok will try on the unraid forum

narayanvs commented 2 years ago

Well, well, well… i am taking my statements on the cache storage theory back.. it crashed again after several weeks .. back to square one.. will keep an eye on the forums for another tip 😂

Rafik89 commented 1 year ago

I also have a problem after rebooting the machine with Frigate, although I do not use Coral PCIE I have the USB version instead. It seems to me that it has no effect.

After a reboot it does not want to pick up at all. Even on a clean database. Here are my logs and config:

logs.txt config.txt

NickM-27 commented 1 year ago

I also have a problem after rebooting the machine with Frigate, although I do not use Coral PCIE I have the USB version instead. It seems to me that it has no effect.

After a reboot it does not want to pick up at all. Even on a clean database. Here are my logs and config:

logs.txt config.txt

Please make your own issue, your logs have no complaint of the coral and is something else.

markmghali commented 1 month ago

Well, well, well… i am taking my statements on the cache storage theory back.. it crashed again after several weeks .. back to square one.. will keep an eye on the forums for another tip 😂

Did you ever figure this out? I bought the tpu adapter again to see if it is any better still similar issues

ich777 commented 1 month ago

Did you ever figure this out? I bought the tpu adapter again to see if it is any better still similar issues

Please create a new issue including your Diagnostics, logs and a detailed description what crashes (Frigate, the Server,...) to be able to troubleshoot further.