question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:59 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
narayanvscommented, Aug 3, 2022

Did you try moving your frigate.db to your cache drive and point frigate to that ? That helped in my case. Also you don’t have to reboot unRAID server to get the tpu back online… can’t remember the exact command but it is mentioned somewhere on this thread.

1reaction
ich777commented, Jun 26, 2022

@narayanvs hey, I think you are running in the temperature limits, please head over to the Unraid forums to my or the Frigate support thread where I already posted a tutorial on how to write your Coral TPU temperatures to a file Click.

Are you sure that you have enough airflow over your TPU? What kind of TPU are you using?

@ministryofsillywalks I think you’ve already asked on the Unraid forums about that, please don’t do double posts across different platforms…

From my perspective this is an issue with the TPU itself and has nothing to do with Frigate…

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SUPPORT] blakeblackshear - Frigate - Docker Containers
Support for Frigate docker container. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.
Read more >
Frigate container does not auto start : r/unRAID - Reddit
Hello Folks, I am running frigate container on unraid and it does not auto start after reboot. It starts momentarily and then shuts...
Read more >
Installing Frigate in Docker & Home Assistant!!! - YouTube
If you are looking for VPN service check this out... ... The video is a tutorial on how to install Frigate NVR in...
Read more >
Installation - Frigate Docs
Frigate is a Docker container that can be run on any Docker host including as a HassOS Addon. Note that a Home Assistant...
Read more >
Unable to load Frigate config.yml in Docker container
…done. Error parsing config: [Errno 21] Is a directory: '/config/config.yml'. Starting nginx ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found