Frigate als Docker Container - Config Probleme und Frigate startet nicht - NAS Mount

Martin86_ERK

New Member
Mar 24, 2025
3
0
1
Schönen guten Abend zusammen,

nach dem ich jetzt etliche Tage damit verbracht hab Frigate zum laufen zu bekommen, brauche ich so langsam ein bissel Hilfe.

Ich habe hier einen Proxmox Server laufen. In diesem Läuft Docker als LXC Container und innerhalb des Containers Läuft Frigate.
Es geht sich dabei dadrum, dass ich eine Fritzbox habe, welche ein Nas Laufwerk bereit stellt. Dieses wird auch vom Host an den LXC weitergeleitet.
Auf dem Dockercontainer habe ich via Portainer zwei volumen, jeweils zum reellen Pfad angebene.

  1. //192.168.2.1/fritz.nas/Backup/frigate/config
  2. //192.168.2.1/fritz.nas/Backup/frigate/clips
Ich kann auch von der Frigate Konsole in die Verzeichnisse schauen.
In dem ersten Pfad liegt selbstverständlich die config.yml des frigate.
Den Zweiten Pfad will ich nutzen im Videos und Snapshots meiner Cams zu speichern.

Meine Frigate will aber einfach nicht starten. Und spukt mir in der Log folgende Fehler aus:
Code:
2025/03/24 01:28:59 EOF
2025-03-24 01:28:59.922240242  [INFO] Service NGINX exited with code 1 (by signal 0)
2025-03-24 01:28:59.997036459  [INFO] Preparing new go2rtc config...
Traceback (most recent call last):
  File "/usr/local/go2rtc/create_config.py", line 40, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
2025-03-24 01:29:00.383463143  [INFO] The go2rtc service exited with code 1 (by signal 0)
2025-03-24 01:29:00.927923518  [INFO] Starting NGINX...
Traceback (most recent call last):
  File "/usr/local/nginx/get_tls_settings.py", line 18, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
2025/03/24 01:29:01 EOF
2025-03-24 01:29:01.048625975  [INFO] Service NGINX exited with code 1 (by signal 0)
2025-03-24 01:29:01.389054693  [INFO] Preparing new go2rtc config...
Traceback (most recent call last):
  File "/usr/local/go2rtc/create_config.py", line 40, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
2025-03-24 01:29:01.745365998  [INFO] The go2rtc service exited with code 1 (by signal 0)
2025-03-24 01:29:02.054469426  [INFO] Starting NGINX...
Traceback (most recent call last):
  File "/usr/local/nginx/get_tls_settings.py", line 18, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
2025/03/24 01:29:02 EOF
2025-03-24 01:29:02.178426098  [INFO] Service NGINX exited with code 1 (by signal 0)
2025-03-24 01:29:02.751194415  [INFO] Preparing new go2rtc config...
Traceback (most recent call last):
  File "/usr/local/go2rtc/create_config.py", line 40, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
2025-03-24 01:29:03.147049663  [INFO] The go2rtc service exited with code 1 (by signal 0)
2025-03-24 01:29:03.184142041  [INFO] Starting NGINX...
Traceback (most recent call last):
  File "/usr/local/nginx/get_tls_settings.py", line 18, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
2025/03/24 01:29:03 EOF
2025-03-24 01:29:03.332729127  [INFO] Service NGINX exited with code 1 (by signal 0)
2025-03-24 01:29:04.152612439  [INFO] Preparing new go2rtc config...
2025-03-24 01:29:04.341888130  [INFO] Starting NGINX...
Traceback (most recent call last):
  File "/usr/local/nginx/get_tls_settings.py", line 18, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
Traceback (most recent call last):
  File "/usr/local/go2rtc/create_config.py", line 40, in <module>
    with open(config_file) as f:
OSError: [Errno 116] Stale file handle: '/config/config.yml'
2025/03/24 01:29:04 EOF
2025-03-24 01:29:04.525852373  [INFO] Service NGINX exited with code 1 (by signal 0)
2025-03-24 01:29:04.566159309  [INFO] The go2rtc service exited with code 1 (by signal 0)

Meine Frigate Compose sieht wie folgt aus:
Code:
version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "128mb"
    devices:
      - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - my_config:/config
      - my_clips:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 10000000000
    ports:
      - "1984:1984"
      - "5000:5000"
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      FRIGATE_RTSP_PASSWORD: "02006741"
volumes:
  my_config:
    external: true

  my_clips:
    external: true

Meine Frigate config.yml:
Code:
mqtt:
  enabled: false

database:
  path: /config/frigate.db

cameras:
  Eingang_main:
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://benutzername:password@192.168.2.52:554/h264Preview_01_main
          roles:
            - record
            - detect
    detect:
      enabled: false # <---- disable detection until you have a working camera feed
      width: 1280
      height: 720

Ich würde mich mega freuen wenn einer von euch mir hierbei helfen würde. Ich bin mit meinem Latein wirklich am ende.
 
Würde das nas Laufwerk im CT einhängen & dieses den in der docker compose als lokales Verzeichnis / mnt / nas etc. Einbinden
 
Wenn alle dagegen sind bin ich dafür. Lach.
Mein docker "test" system betreibe ich im LXC . ( In 10min aufgesetzt inkl. Portainer ) .
Ich denke / behaupte dein lösungs Ansatz ist falsch. Die Docker Volumes sollten nicht Remote liegen.
Irgendwas schwebt mir in Erinnerung. NFS / Cifs mit Docker direkt kann Probleme machen. Sind die Freigaben aber per System gemountet zb. /mnt/Nas dann kann Docker damit ordentlich arbeiten...
 
Das ganze läuft im LXC sehr stabil und Ressourcen schonend.
Ich hab es mittlerweile hin bekommen.
Hab das Nas Verzeichnis auf dem Host gemountet und dann an docker über „mp0: „ weitergegeben.

Hatte dann noch ein kleinen Berechtigungsproblem, welches sich aber auch unproblematisch lösen ließ.

Ich hab es jetzt so hin bekommen, das er mich die Clips von Frigate auf dem Nas speichern lässt. Die Config bekomme ich aber nicht auf das Nas. Irgendwie will er dann nie starten. Deshalb belasse ich sie jetzt im Frigate Container.

Hatte das System zwischenzeitlich auch mal als unpriviligiert versucht nach zu bauen aber da will es noch viel weniger funktionieren. Wobei mir das ja eigentlich lieber wäre.

Ich hatte eh in Zukunft vor mir ein richtiges Nas zu besorgen. Gibt es da eines was zu empfehlen wäre?

Lg Martin