Skip to content

Database Error: Missing 'torrent_contents' Relation During Item Load #347

Open
@thxrhmn

Description

  • I have checked the existing issues to avoid duplicates
  • I have redacted any info hashes and content metadata from any logs or screenshots attached to this issue

Describe the bug

When attempting to load item results, the following error occurs repeatedly:

Error loading item results: ERROR: relation "torrent_contents" does not exist (SQLSTATE 42P01)
failed to get count for key 'content_type': ERROR: relation "torrent_contents" does not exist (SQLSTATE 42P01)

To Reproduce

Steps to reproduce the behavior:

  1. Attempt to load item results.
  2. Observe the error related to the torrent_contents relation.

Expected behavior

Item results should load without encountering database errors. The application should be able to retrieve counts for content_type without issues.

Environment Information (Required)

  • Bitmagnet version: 0.9.5
  • OS and version: archcraft 6.11.3-arch1-1
  • Browser and version (if issue is with WebUI): Edge 126.0.2592.87

Additional context

This error seems to indicate that the torrent_contents relation (table) does not exist in the database. It might be a missing or incorrectly configured database migration.

Docker Compose Configuration

Here is the docker-compose.yml configuration I am using:

services:
  bitmagnet:
    image: ghcr.io/bitmagnet-io/bitmagnet:latest
    container_name: bitmagnet
    ports:
      # API and WebUI port:
      - "3333:3333"
      # BitTorrent ports:
      - "3334:3334/tcp"
      - "3334:3334/udp"
    restart: unless-stopped
    environment:
      - POSTGRES_HOST=postgres
      - POSTGRES_PASSWORD=postgres
    #      - TMDB_API_KEY=your_api_key
    command:
      - worker
      - run
      - --keys=http_server
      - --keys=queue_server
      # disable the next line to run without DHT crawler
      - --keys=dht_crawler
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:16-alpine
    container_name: bitmagnet-postgres
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    restart: unless-stopped
    environment:
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=bitmagnet
      - PGUSER=postgres
    shm_size: 1g
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready
      start_period: 20s
      interval: 10s

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions