juanfont / headscale

An open source, self-hosted implementation of the Tailscale control server
BSD 3-Clause "New" or "Revised" License
22.93k stars 1.26k forks source link

[Bug] Error initializing error="enabling foreign keys: disk I/O error #2142

Open mimnix opened 1 month ago

mimnix commented 1 month ago

Is this a support request?

Is there an existing issue for this?

Current Behavior

Hello, I'm experiencing an issue in the upgrade from 0.23.0-beta3 to 0.23.0-beta4, using sqlite as database. Headscale doesn't start with the error:

headscale     | 2024-09-19T23:20:19Z INF Opening database database=sqlite3 path=/var/lib/headscale/db.sqlite
headscale     | 2024-09-19T23:20:19Z FTL home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:24 > Error initializing error="enabling foreign keys: disk I/O error (5386)"
headscale     | 2024-09-19T23:20:20Z INF Opening database database=sqlite3 path=/var/lib/headscale/db.sqlite
headscale     | 2024-09-19T23:20:20Z FTL home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:24 > Error initializing error="enabling foreign keys: disk I/O error (5386)"
headscale     | 2024-09-19T23:20:20Z INF Opening database database=sqlite3 path=/var/lib/headscale/db.sqlite

Any suggestions? Thank you!

Expected Behavior

A successful upgrade from 0.23.0-beta3 to 0.23.0-beta4

Steps To Reproduce

  1. using headscale docker image headscale/headscale:0.23.0-beta3, setup the server (with sqlite as db) and add some clients
  2. Stop the stack/container and change the image tag to headscale/headscale:0.23.0-beta4
  3. Start the stack/container again

Environment

- OS: Oracle Linux Server release 8.10
- Headscale version: 0.23.0-beta.4
- Tailscale version: 1.74.0

Runtime environment

Anything else?

No response

kradalby commented 1 month ago

I'm not able to reproduce this, can you send me a copy of a database where this is happening? preferably one that is as minimal as possible.