Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
thxrhmn opened this issue Nov 5, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@thxrhmn
Copy link

thxrhmn commented Nov 5, 2024

  • 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
@thxrhmn thxrhmn added the bug Something isn't working label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant