[Config Support]: Trouble setting up NAS as data directory for docker compose #16005
-
Describe the problem you are havingI am new to Frigate and am trying to get things setup. I had it setup and working earlier this week using the sd card of my rpi, and was able to view video and record events. Today I have been trying to use my NAS as the new data/config directory when I tried to start it, it is no longer connecting to the camera. The logs indicate some sort of connection refused status (Failed to connect to 127.0.0.1 port 5000: Connection refused) that I am not sure how to debug. I am running this in docker compose on a raspberry pi 4 running raspberry pi os (bookworm) with a google coral usb. I am using a mounted network drive as the location for the recordings and the config directory for frigate. The NAS is mounted using fstab and I can definitely access the mount and the files on it. These are the permissions in the config directory: I am able to view the stream in vlc media player using the same path that is in the config.yaml This is how my fstab mount is setup:
These are the permission for the cred_1 file:
The NAS is a separate debian machine running omv7. I believe I have given the necessary user permissions, but clearly I am missing something. Versionstable - 0.14.1-f4f3cfa Frigate config filemqtt:
enabled: false
# if you want to decode a h264 stream
ffmpeg:
hwaccel_args: preset-rpi-64-h264
detectors:
coral:
type: edgetpu
device: usb
#Global Object Settings
objects:
track:
- person
- cat
filters:
person:
min_area: 5000
max_area: 100000
go2rtc:
streams:
picam:
- rtsp://user:pw@192.168.1.203:8554/cam1
review:
alerts:
labels:
- cat
- person
cameras:
picam: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://user:pw@192.168.1.203:8554/cam1
roles:
- detect
- record
detect:
width: 1280
height: 720
fps: 5
snapshots:
enabled: true
record:
enabled: true
retain:
days: 5
mode: motion
events:
retain:
default: 30
mode: active_objects
objects:
cat: 60
person: 15
version: 0.14Relevant Frigate log outputs6-rc: info: service certsync-log: starting
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
s6-rc: info: service nginx-log successfully started
s6-rc: info: service certsync-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service go2rtc-healthcheck: starting
s6-rc: info: service frigate: starting
s6-rc: info: service go2rtc-healthcheck successfully started
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
2025-01-15 22:44:58.789024319 [INFO] Preparing Frigate...
2025-01-15 22:44:58.809749506 [INFO] Starting NGINX...
2025-01-15 22:44:59.199333703 [INFO] Preparing new go2rtc config...
2025-01-15 22:44:59.265917519 [INFO] Starting Frigate...
s6-rc: info: service nginx successfully started
s6-rc: info: service certsync: starting
s6-rc: info: service certsync successfully started
s6-rc: info: service legacy-services: starting
2025-01-15 22:45:00.164964795 [INFO] Starting certsync...
s6-rc: info: service legacy-services successfully started
2025-01-15 22:45:00.661924700 127.0.0.1 - - [15/Jan/2025:22:45:00 -0500] "" 400 0 "-" "-" "-"
2025-01-15 22:45:00.819314903 [INFO] Starting go2rtc...
2025-01-15 22:45:01.054038490 22:45:01.053 INF go2rtc platform=linux/arm64 revision=b2399f3 version=1.9.2
2025-01-15 22:45:01.055559708 22:45:01.054 INF config path=/dev/shm/go2rtc.yaml
2025-01-15 22:45:01.056712710 22:45:01.056 INF [rtsp] listen addr=:8554
2025-01-15 22:45:01.057057241 22:45:01.056 INF [api] listen addr=:1984
2025-01-15 22:45:01.057570234 22:45:01.057 INF [webrtc] listen addr=:8555/tcp
2025-01-15 22:45:05.207101117 [2025-01-15 22:45:05] frigate.app INFO : Starting Frigate (0.14.1-f4f3cfa)
2025-01-15 22:45:05.212551074 [2025-01-15 22:45:05] frigate.util.config INFO : Checking if frigate config needs migration...
2025-01-15 22:45:05.271498062 [2025-01-15 22:45:05] frigate.util.config INFO : copying config as backup...
2025-01-15 22:45:05.314423137 [2025-01-15 22:45:05] frigate.util.config INFO : Finished frigate config migration...
2025-01-15 22:45:05.458506822 [2025-01-15 22:45:05] peewee_migrate.logs INFO : Starting migrations
2025-01-15 22:45:05.462825685 [2025-01-15 22:45:05] peewee_migrate.logs INFO : There is nothing to migrate
2025-01-15 22:45:05.483716619 [2025-01-15 22:45:05] frigate.app INFO : Recording process started: 341
2025-01-15 22:45:05.514525797 [2025-01-15 22:45:05] frigate.app INFO : Recording process started: 342
2025-01-15 22:45:05.531517993 [2025-01-15 22:45:05] frigate.app INFO : go2rtc process pid: 98
2025-01-15 22:45:05.625930980 [2025-01-15 22:45:05] detector.coral INFO : Starting detection process: 369
2025-01-15 22:45:05.626436824 [2025-01-15 22:45:05] frigate.app INFO : Output process started: 371
2025-01-15 22:45:05.639019177 [2025-01-15 22:45:05] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2025-01-15 22:45:08.373908818 [2025-01-15 22:45:08] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2025-01-15 22:45:08.788769143 [INFO] Starting go2rtc healthcheck service...
2025-01-15 22:45:13.605725067 2025/01/15 22:45:13 [error] 158#158: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "127.0.0.1:5000"
2025-01-15 22:45:13.605775122 2025/01/15 22:45:13 [error] 158#158: *2 auth request unexpected status: 502 while sending to client, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", host: "127.0.0.1:5000"
2025-01-15 22:45:15.637915041 Exception in thread Thread-1:
2025-01-15 22:45:15.637925689 Traceback (most recent call last):
2025-01-15 22:45:15.637928615 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3263, in connect
2025-01-15 22:45:15.637939485 self._state.set_connection(self._connect())
2025-01-15 22:45:15.637943004 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3607, in _connect
2025-01-15 22:45:15.638534088 self._add_conn_hooks(conn)
2025-01-15 22:45:15.638572124 File "/usr/local/lib/python3.9/dist-packages/playhouse/sqlite_ext.py", line 1084, in _add_conn_hooks
2025-01-15 22:45:15.639097043 super(SqliteExtDatabase, self)._add_conn_hooks(conn)
2025-01-15 22:45:15.639115469 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3617, in _add_conn_hooks
2025-01-15 22:45:15.640353062 self._set_pragmas(conn)
2025-01-15 22:45:15.640373655 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3632, in _set_pragmas
2025-01-15 22:45:15.641700821 cursor.execute('PRAGMA %s = %s;' % (pragma, value))
2025-01-15 22:45:15.641767950 sqlite3.OperationalError: locking protocol
2025-01-15 22:45:15.641770246
2025-01-15 22:45:15.641772524 During handling of the above exception, another exception occurred:
2025-01-15 22:45:15.641773709
2025-01-15 22:45:15.641785672 Traceback (most recent call last):
2025-01-15 22:45:15.641797653 File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
2025-01-15 22:45:15.642425459 self.run()
2025-01-15 22:45:15.642446996 File "/usr/lib/python3.9/threading.py", line 892, in run
2025-01-15 22:45:15.643247058 self._target(*self._args, **self._kwargs)
2025-01-15 22:45:15.643257355 File "/usr/local/lib/python3.9/dist-packages/playhouse/sqliteq.py", line 272, in run
2025-01-15 22:45:15.643258818 writer.run()
2025-01-15 22:45:15.643261225 File "/usr/local/lib/python3.9/dist-packages/playhouse/sqliteq.py", line 129, in run
2025-01-15 22:45:15.643461000 conn = self.database.connection()
2025-01-15 22:45:15.643481314 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3303, in connection
2025-01-15 22:45:15.644693871 self.connect()
2025-01-15 22:45:15.644720056 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3266, in connect
2025-01-15 22:45:15.645899947 self._initialize_connection(self._state.conn)
2025-01-15 22:45:15.645948076 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3088, in __exit__
2025-01-15 22:45:15.647058227 reraise(new_type, new_type(exc_value, *exc_args), traceback)
2025-01-15 22:45:15.647080671 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 196, in reraise
2025-01-15 22:45:15.647314353 raise value.with_traceback(tb)
2025-01-15 22:45:15.647320131 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3263, in connect
2025-01-15 22:45:15.648424041 self._state.set_connection(self._connect())
2025-01-15 22:45:15.648443819 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3607, in _connect
2025-01-15 22:45:15.649652820 self._add_conn_hooks(conn)
2025-01-15 22:45:15.649676357 File "/usr/local/lib/python3.9/dist-packages/playhouse/sqlite_ext.py", line 1084, in _add_conn_hooks
2025-01-15 22:45:15.650220849 super(SqliteExtDatabase, self)._add_conn_hooks(conn)
2025-01-15 22:45:15.650245571 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3617, in _add_conn_hooks
2025-01-15 22:45:15.651461869 self._set_pragmas(conn)
2025-01-15 22:45:15.651487387 File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3632, in _set_pragmas
2025-01-15 22:45:15.652722906 cursor.execute('PRAGMA %s = %s;' % (pragma, value))
2025-01-15 22:45:15.652775683 peewee.OperationalError: locking protocol
2025-01-15 22:45:28.741746878 2025/01/15 22:45:28 [error] 160#160: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "127.0.0.1:5000"
2025-01-15 22:45:28.741797155 2025/01/15 22:45:28 [error] 160#160: *4 auth request unexpected status: 502 while sending to client, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", host: "127.0.0.1:5000"
2025-01-15 22:45:43.915338358 2025/01/15 22:45:43 [error] 166#166: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "127.0.0.1:5000"
2025-01-15 22:45:43.915362802 2025/01/15 22:45:43 [error] 166#166: *6 auth request unexpected status: 502 while sending to client, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", host: "127.0.0.1:5000"
2025-01-15 22:45:59.041085832 2025/01/15 22:45:59 [error] 159#159: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "127.0.0.1:5000"
2025-01-15 22:45:59.041134183 2025/01/15 22:45:59 [error] 159#159: *8 auth request unexpected status: 502 while sending to client, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", host: "127.0.0.1:5000"
2025-01-15 22:46:00.747461817 127.0.0.1 - - [15/Jan/2025:22:46:00 -0500] "" 400 0 "-" "-" "-"
2025-01-15 22:46:14.179560527 2025/01/15 22:46:14 [error] 158#158: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "127.0.0.1:5000"
2025-01-15 22:46:14.179837450 2025/01/15 22:46:14 [error] 158#158: *11 auth request unexpected status: 502 while sending to client, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", host: "127.0.0.1:5000"
2025-01-15 22:46:29.301144277 2025/01/15 22:46:29 [error] 158#158: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "127.0.0.1:5000"
2025-01-15 22:46:29.301196258 2025/01/15 22:46:29 [error] 158#158: *13 auth request unexpected status: 502 while sending to client, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", host: "127.0.0.1:5000"Relevant go2rtc log outputNone are producedFrigate statsNo response Operating systemOther Linux Install methodDocker Compose docker-compose file or Docker CLI commandversion: "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: "64mb" # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
- /dev/video11:/dev/video11 # For Raspberry Pi 4B
volumes:
- /etc/localtime:/etc/localtime:ro
- /media/picam_share/config:/config
- /media/picam_share/cctv_clips:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "9971:8971"
- "5050:5000" # Internal unauthenticated access. Expose carefully.
- "8654:8554" # RTSP feeds
- "8855:8555/tcp" # WebRTC over tcp
- "8855:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "password"Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
The config directory needs to be local |
Beta Was this translation helpful? Give feedback.
The config directory needs to be local