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.

Can't start docker container: disk I/O error

See original GitHub issue

Describe the bug A clear and concise description of what your issue is.

 * Starting nginx nginx
   ...done.
Starting migrations
peewee_migrate                 INFO    : Starting migrations
peewee                         DEBUG   : ('CREATE TABLE IF NOT EXISTS "migratehistory" ("id" INTEGER NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "migrated_at" DATETIME NOT NULL)', [])
disk I/O error

** docker script **

docker run -d \
  --privileged \
  --name frigate \
  --restart=unless-stopped \
  --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
  -v $CONF/media:/media/frigate \
  -v $CONF/config:/config \
  -v /etc/localtime:/etc/localtime:ro \
  -e FRIGATE_RTSP_PASSWORD='password' \
  -p 5000:5000 \
  -p 1935:1935 \
  blakeblackshear/frigate:stable-amd64

Version of frigate Output from /api/version

blakeblackshear/frigate:stable-amd64

Config file Include your full config file wrapped in triple back ticks.

logger:
  default: debug
detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu
mqtt:
  host: duboce
cameras:
  back:
    ffmpeg:
      inputs:
        - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
            - rtmp
    width: 1280
    height: 720
    fps: 5

Frigate container logs

Include relevant log output here

Frigate stats

Output from frigate's /api/stats endpoint

FFprobe from your camera

Run the following command and paste output below

ffprobe <stream_url>

Screenshots If applicable, add screenshots to help explain your problem.

Computer Hardware

  • OS: MacOs
  • Install method: Docker Command
  • Virtualization:Virtualbox
  • Coral Version: None
  • Network Setup: Wifi

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
robcoscommented, Jun 25, 2021

The folders are writable (as you can see) as there are some files in it.

0reactions
F0rgedcommented, Jul 23, 2022

As a (IMO) proper workaround - mount the DB file separately on the host itself (not the network share as the clip recordings), it can be somewhere near the config.yml file. I have the following mappings:

./config.yml:/config/config.yml
./frigate.db:/media/frigate/frigate.db
/mnt/nvr/clips:/media/frigate/clips
/mnt/nvr/recordings:/media/frigate/recordings

Just make sure to create beforehand the file named frigate.db on the host in the mounting location. Otherwise docker will mount it as a folder and not as a single file by default.

I had the same issue. Running Frigate in Docker on top of proxmox, with a mounted zfs volume. I do have open media vault running and its hosting files from the same zfs partition and pool etc, but that volume is just mounted straight up…

In any case, mounting the clips, recordings and frigate.db individually seemed to solve that particular issue. Now Im running into a strange storage space issue but looks like theres a separate thread for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

disk I/O error when using Sqlite3 and SqlAlchemy in docker
1 Answer 1 · Removed database.sqlite3 · Created database.sqlite3 · Setup right permissions. · Error ocurred. · After some titme figured out that...
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Docker frequently asked questions (FAQ)
You can run both Linux and Windows programs and executables in Docker containers. ... This error points out that the docker client cannot...
Read more >
Overview | Docker Documentation
Select the Docker menu whale menu and then Troubleshoot; Select the Troubleshoot icon from the Docker Dashboard. Troubleshoot Docker Desktop. The Troubleshoot ...
Read more >
Troubleshoot topics | Docker Documentation
If you are using mounted volumes and get runtime errors indicating an application file is not found, access to a volume mount is...
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