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

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

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 59 (2 by maintainers)

Most upvoted comments

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.

@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…

sorry to open this up again but I have exactly the same issue on unraid. When I boot the server the TPU is found and is alive. As soon as I start frigate the tpu shuts down and isn’t found any more.

tried switching to the latest beta4 but the error still continues.

I don’t really feel like starting my unraid system from scratch so is there any other solution? Currently still on 6.9.2

@narayanvs did you swtich pci slots? did that help?

I did a full reinstall of my Unraid Server, setup everything again. So far it looks promising. frigate and coral seems happy so far (since 5 days).

Thanks for the support.

have another question - more of a docker issue . i will open another thread for that.

So I went about my Frigate install a little different on Unraid. No terminal commands or crazy changes. For context I am running Unraid on an i5 with Nvidia GPU & Coral TPU connected via PCIe. Here is what I did:

Install the Coral drivers from the app store:

2022-06-03 screenshot (4)

  • Search the Unraid app store for Frigate. Select the non-nvidia one:

2022-06-03 screenshot

Then edited like this:

2022-06-03 screenshot (1) 2022-06-03 screenshot (2)

Make sure you replace the repository to the current beta - blakeblackshear/frigate:0.11.0-beta2

If you have a Nvidia card also do this. Press advanced view, add --gpus all into the Extra Parameters: section.

2022-06-03 screenshot (3)

Also install the Nvidia drivers from the app store: 2022-06-03 screenshot (5)