From 2da459dae24b3f6015d3e275267cde1fb38d9d61 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Fri, 29 Dec 2023 16:23:38 -0800 Subject: [PATCH] address `SQLITE_IOERR_GETTEMPPATH` from docker --- guide/install.md | 6 ++++++ guide/troubleshooting.md | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/guide/install.md b/guide/install.md index 123241e..5412202 100644 --- a/guide/install.md +++ b/guide/install.md @@ -58,6 +58,12 @@ services: # Docker will "helpfully" create a directory by this name otherwise. - "/etc/moonfire-nvr.toml:/etc/moonfire-nvr.toml:ro" + # Pass through `/var/tmp` from the host. + # SQLite expects to be able to create temporary files in this dir, which + # is not created in Moonfire's minimal Docker image. + # See: + - "/var/tmp:/var/tmp" + # Add additional mount lines here for each sample file directory # outside of /var/lib/moonfire-nvr, e.g.: # - "/media/nvr:/media/nvr" diff --git a/guide/troubleshooting.md b/guide/troubleshooting.md index 40d60af..965653a 100644 --- a/guide/troubleshooting.md +++ b/guide/troubleshooting.md @@ -228,6 +228,22 @@ clock_gettime failed: EPERM: Operation not permitted This indicates a broken environment. See the troubleshooting guide. ``` +#### `VFS is unable to determine a suitable directory for temporary files` + +Moonfire NVR's database internally uses SQLite, which creates +[various temporary files](https://www.sqlite.org/tempfiles.html). If it can't +find a path that exists and is writable by the current user, it will produce +errors such as the following: + +``` +2023-12-29T16:16:47.795330 WARN sync-1 syncer{path=/media/nvr/sample}: moonfire_db::writer: flush failure on save for reason 120 sec after start of 59 seconds driveway-sub recording 10/1222348; will retry after PT60S: UNAVAILABLE +caused by: disk I/O error +caused by: Error code 6410: VFS is unable to determine a suitable directory for temporary files +``` + +The simplest solution is to pass `/var/tmp` through from the host to the Docker +container in your Docker compose file. + ### Server errors #### `Error: pts not monotonically increasing; got 26615520 then 26539470`