8000 [BUG] Start of application failed for missing database file · Issue #132 · Xoconoch/spotizerr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[BUG] Start of application failed for missing database file #132
Closed
@BigT-CZE

Description

@BigT-CZE

Describe the bug
Deploy new installation by following the manual fails due to missing db file

To Reproduce
Precise steps to reproduce the behavior (start from how you built your container):

  1. Deploy new installation by following the manual
  2. run docker compose file docker compose up -d
  3. application doesnt start
  4. See error
Using Redis at redis://:redispass@redis:6379/0
Created group: appgroup (GID: 1000)
Created user: appuser (UID: 1000)
Setting permissions for /app directories...
chown: cannot access '/app/config': No such file or directory
chown: cannot access '/app/creds': No such file or directory
chown: cannot access '/app/cache': No such file or directory
Starting application as appuser...
2025-05-30 11:59:56,455 - routes.utils.celery_config - INFO - Redis configuration: REDIS_URL=redis://:redispass@redis:6379/0, REDIS_BACKEND=redis://:redispass@redis:6379/0
2025-05-30 11:59:56,456 - routes.utils.celery_config - ERROR - Error reading config: Expecting value: line 1 column 1 (char 0)
2025-05-30 11:59:56,458 - routes.utils.watch.db - ERROR - Error initializing watched_playlists table: unable to open database file
Traceback (most recent call last):
  File "/app/routes/utils/watch/db.py", line 32, in init_playlists_db
    with _get_playlists_db_connection() as conn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/routes/utils/watch/db.py", line 19, in _get_playlists_db_connection
    conn = sqlite3.connect(PLAYLISTS_DB_PATH, timeout=10)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
2025-05-30 11:59:56,459 - routes - ERROR - An unexpected error occurred during Playlist Watch Manager setup: unable to open database file
Traceback (most recent call last):
  File "/app/routes/__init__.py", line 14, in <module>
    start_watch_manager()
  File "/app/routes/utils/watch/manager.py", line 396, in start_watch_manager
    init_playlists_db() # For playlists
    ^^^^^^^^^^^^^^^^^^^
  File "/app/routes/utils/watch/db.py", line 32, in init_playlists_db
    with _get_playlists_db_connection() as conn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/routes/utils/watch/db.py", line 19, in _get_playlists_db_connection
    conn = sqlite3.connect(PLAYLISTS_DB_PATH, timeout=10)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
2025-05-30 11:59:56 [MainProcess:MainThread] [root] [INFO] - Logging system initialized
2025-05-30 11:59:56 [MainProcess:MainThread] [root] [INFO] - === Spotizerr Application Starting ===
2025-05-30 11:59:56 [MainProcess:MainThread] [root] [INFO] - Checking Redis connection to redis:6379
2025-05-30 11:59:56 [MainProcess:MainThread] [root] [INFO] - Successfully connected to Redis
2025-05-30 11:59:56 [MainProcess:MainThread] [routes.utils.watch.db] [ERROR] - Error initializing watched_playlists table: unable to open database file
Traceback (most recent call last):
  File "/app/routes/utils/watch/db.py", line 32, in init_playlists_db
    with _get_playlists_db_connection() as conn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/routes/utils/watch/db.py", line 19, in _get_playlists_db_connection
    conn = sqlite3.connect(PLAYLISTS_DB_PATH, timeout=10)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
Error loading configuration: Expecting value: line 1 column 1 (char 0)
Celery Download Queue Manager initialized with max_concurrent=3
Traceback (most recent call last):
  File "/app/app.py", line 250, in <module>
    start_watch_manager()
  File "/app/routes/utils/watch/manager.py", line 396, in start_watch_manager
    init_playlists_db() # For playlists
    ^^^^^^^^^^^^^^^^^^^
  File "/app/routes/utils/watch/db.py", line 32, in init_playlists_db
    with _get_playlists_db_connection() as conn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/routes/utils/watch/db.py", line 19, in _get_playlists_db_connection
    conn = sqlite3.connect(PLAYLISTS_DB_PATH, timeout=10)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
Using Redis at redis://:redispass@redis:6379/0

Expected behavior
App starts

docker-compose.yaml

name: spotizerr

services:
  spotizerr:
    volumes:
      - /data/docker/spotizerr/data:/app/data
      - /data/docker/spotizerr/downloads:/app/downloads  # <-- Change this for your music library dir
      - /data/docker/spotizerr/logs:/app/logs  # <-- Volume for persistent logs
    ports:
      - 7171:7171
    image: cooldockerizer93/spotizerr
    container_name: spotizerr-app
    restart: unless-stopped
    environment:
      - PUID=${PUID}  # Replace with your desired user ID  | Remove both if you want to run as root (not recommended, might result in unreadable files)
      - PGID=${PGID}  # Replace with your desired group ID | The user must have write permissions in the volume mapped to /app/downloads
      - UMASK=${UMASK} # Optional: Sets the default file permissions for newly created files within the container.
      - REDIS_HOST=${REDIS_HOST}
      - REDIS_PORT=${REDIS_PORT}
      - REDIS_DB=${REDIS_DB}
      - REDIS_PASSWORD=${REDIS_PASSWORD}  # Optional, Redis AUTH password. Leave empty if not using authentication
      - REDIS_URL=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DB}
      - REDIS_BACKEND=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DB}
      - EXPLICIT_FILTER=${EXPLICIT_FILTER} # Set to true to filter out explicit content
    depends_on:
      - redis

  redis:
    image: redis:alpine
    container_name: spotizerr-redis
    restart: unless-stopped
    environment:
      - REDIS_PASSWORD=${REDIS_PASSWORD}
    volumes:
      - redis-data:/data
    command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes

volumes:
  redis-data:
    driver: local

.env

# Docker Compose environment variables# Delete all comments of this when deploying (everything that is )

# Redis connection (external or internal)
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=somepass

# Set to true to filter out explicit content
EXPLICIT_FILTER=false

# User ID for the container
PUID=1000

# Group ID for the container
PGID=1000

# Optional: Sets the default file permissions for newly created files within the container.
UMASK=0022

Config

  • You can either share a screenshot of the config page or, preferably, the config file (should be under ./config/main.json, depending on where you mapped it on your docker-compose.yaml)
    application didnt start yet, so config cannot be done over UI

Logs

2025-05-30 10:58:47 [MainProcess:MainThread] [root] [INFO] - Logging system initialized
2025-05-30 10:58:47 [MainProcess:MainThread] [root] [INFO] - === Spotizerr Application Starting ===
2025-05-30 10:58:47 [MainProcess:MainThread] [root] [INFO] - Checking Redis connection to redis:6379
2025-05-30 10:58:47 [MainProcess:MainThread] [root] [INFO] - Successfully connected to Redis
2025-05-30 10:58:47 [MainProcess:MainThread] [routes.utils.watch.db] [ERROR] - Error initializing watched_playlists table: unable to open database file
Traceback (most recent call last):
  File "/app/routes/utils/watch/db.py", line 32, in init_playlists_db
    with _get_playlists_db_connection() as conn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/routes/utils/watch/db.py", line 19, in _get_playlists_db_connection
    conn = sqlite3.connect(PLAYLISTS_DB_PATH, timeout=10)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file

Version
2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0