Feramance / qBitrr

A simple Python script to talk to qBittorrent and Arr's
MIT License
61 stars 2 forks source link

"Database disk image malformed" #34

Closed purple-emily closed 7 months ago

purple-emily commented 7 months ago

This is a very fresh installation of the docker radarr:develop. I'm not sure if this error is caused by the develop branch or something else:

docker-qbitrr-1  | STARTING QBITRR
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       1][tid:140239977745280] INFO    : qBitrr             : Starting qBitrr: Version: 3.8.6-51c0f34.
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       1][tid:140239977745280] INFO    : qBitrr             : Restart timer is set to 0 hours
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       1][tid:140239977745280] INFO    : qBitrr.Manager     : Current qBitTorrent version is supported: 4.6.1
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       1][tid:140239977745280] HNOTICE : qBitrr.Sonarr-TV   : Starting Sonarr-TV monitor
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       1][tid:140239977745280] HNOTICE : qBitrr.Radarr-Movie: Starting Radarr-Movie monitor
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       1][tid:140239977745280] HNOTICE : qBitrr.Recheck     : Starting Recheck monitor
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       1][tid:140239977745280] HNOTICE : qBitrr.Failed      : Starting Failed monitor
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       8][tid:140239977745280] HNOTICE : qBitrr.Sonarr-TV   : Starting torrent monitoring for Sonarr-TV
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:      10][tid:140239977745280] HNOTICE : qBitrr.Radarr-Movie: Starting torrent monitoring for Radarr-Movie
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:      11][tid:140239977745280] HNOTICE : qBitrr.Recheck     : Starting torrent monitoring for Recheck
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:      12][tid:140239977745280] HNOTICE : qBitrr.Failed      : Starting torrent monitoring for Failed
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       7][tid:140239977745280] INFO    : qBitrr.Sonarr-TV   : Loop completed, restarting it.
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       9][tid:140239977745280] ERROR   : qBitrr.Radarr-Movie: Database disk image malformed
docker-qbitrr-1  | [2023-11-25 09:56:51] [pid:       9][tid:140239977745280] INFO    : qBitrr.Radarr-Movie: Loop completed, restarting it.
docker-qbitrr-1  | [2023-11-25 09:57:01] [pid:       9][tid:140239977745280] ERROR   : qBitrr.Radarr-Movie: Database disk image malformed
docker-qbitrr-1  | [2023-11-25 09:57:01] [pid:       9][tid:140239977745280] INFO    : qBitrr.Radarr-Movie: Loop completed, restarting it.
docker-qbitrr-1  | [2023-11-25 09:57:01] [pid:       7][tid:140239977745280] INFO    : qBitrr.Sonarr-TV   : Loop completed, restarting it.
docker-qbitrr-1  | [2023-11-25 09:57:11] [pid:       7][tid:140239977745280] INFO    : qBitrr.Sonarr-TV   : Loop completed, restarting it.
docker-qbitrr-1  | [2023-11-25 09:57:11] [pid:       9][tid:140239977745280] ERROR   : qBitrr.Radarr-Movie: Database disk image malformed
docker-qbitrr-1  | [2023-11-25 09:57:11] [pid:       9][tid:140239977745280] INFO    : qBitrr.Radarr-Movie: Loop completed, restarting it.
docker-qbitrr-1  | [2023-11-25 09:57:21] [pid:       9][tid:140239977745280] ERROR   : qBitrr.Radarr-Movie: Database disk image malformed

Happy to provide as much info as I can to help get to the bottom of this.

I deleted and recreated the radarr database and the qbitrr created database in the config. No change.

docker-compose.yml:

x-common-keys-restart-unless-stopped: &common-keys-restart-unless-stopped
  networks:
    - npm_proxy
  security_opt:
    - no-new-privileges:true
  restart: unless-stopped

x-environment-tz-puid-pgid: &env-tz-puid-pgid
  TZ: $TZ
  PUID: $PUID
  PGID: $PGID

x-environment-umask: &env-umask
  UMASK_SET: 022

# --- cut out other services ---

  qbittorrent:
    <<: *common-keys-restart-unless-stopped # See EXTENSION FIELDS at the top
    container_name: qbittorrent
    environment:
      <<: 
        - *env-tz-puid-pgid
        - *env-umask
      WEBUI_PORT: 8080
    image: lscr.io/linuxserver/qbittorrent:latest
    # image: lscr.io/linuxserver/qbittorrent:4.6.0
    ports:
      # - 8080:8080
      - 6881:6881/tcp
      - 6881:6881/udp
    volumes:
      - $DOCKERDIR/appdata/qbittorrent:/config/qBittorrent
      - $MEDIADIR/torrents:/media/torrents

  # Prowlarr - Indexer manager/proxy for torrents
  prowlarr:
    <<: *common-keys-restart-unless-stopped # See EXTENSION FIELDS at the top
    container_name: prowlarr
    environment:
      <<: 
        - *env-tz-puid-pgid
        - *env-umask
    image: ghcr.io/linuxserver/prowlarr:develop
    # ports:
    #   - 9696:9696
    volumes:
      - $DOCKERDIR/appdata/prowlarr:/config
      # - $MEDIADIR:/media # Removed as not needed?

  # Radarr - Movie management
  radarr:
    <<: *common-keys-restart-unless-stopped # See EXTENSION FIELDS at the top
    container_name: radarr
    environment:
      <<: 
        - *env-tz-puid-pgid
        - *env-umask
    image: ghcr.io/linuxserver/radarr:develop # latest tag was causing "Error parsing column 45"
    # ports:
    #   - "7878:7878"
    volumes:
      - $DOCKERDIR/appdata/radarr:/config
      - $MEDIADIR:/media

  # Sonarr - TV management
  sonarr:
    <<: *common-keys-restart-unless-stopped # See EXTENSION FIELDS at the top
    container_name: sonarr
    environment:
      <<: 
        - *env-tz-puid-pgid
        - *env-umask
    image: ghcr.io/linuxserver/sonarr:develop
    # ports:
    #   - 8989:8989
    volumes:
      - $DOCKERDIR/appdata/sonarr:/config
      - $MEDIADIR:/media

# --- more cuts ---

  qbitrr:
    <<: *common-keys-restart-unless-stopped # See EXTENSION FIELDS at the top
    image: feramance/qbitrr
    tty: true # Ensure the output of docker-compose logs qBitrr are properly colored.
    environment:
      <<: 
        - *env-tz-puid-pgid
        - *env-umask
      RESTART_TIMER: 0 #Number of hours after which to restart the child processes (default=0, set 0 to disable)
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - $DOCKERDIR/appdata/qbitrr:/config  # Config folder for qBitrr
      - $DOCKERDIR/appdata/sonarr/sonarr.db:/sonarr/sonarr.db:ro # This is only needed if you want episode search handling :ro means it is only ever mounted as a read-only folder, the script never needs more than read access
      - $DOCKERDIR/appdata/radarr/radarr.db:/radarr/radarr.db:ro # This is only needed if you want movie search handling, :ro means it is only ever mounted as a read-only folder, the script never needs more than read access
      - $MEDIADIR/torrents:/media/torrents:rw # The script will ALWAYS require write permission in this folder if mounted, this folder is used to monitor completed downloads and if not present will cause the script to ignore downloaded file monitoring.
      # Now just to make sure it is clean, when using this script in a docker you will need to ensure you config.toml values reflect the mounted folders.#
      # For example, for your Sonarr.DatabaseFile value using the values above you'd add
      # DatabaseFile = /sonarr.db/path/in/container/sonarr.db
      # Because this is where you mounted it to
      # The same would apply to Settings.CompletedDownloadFolder
      # e.g CompletedDownloadFolder = /completed_downloads/folder/in/container

    logging: # this script will generate a LOT of logs - so it is up to you to decide how much of it you want to store
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: 3
    # depends_on: # Not needed but this ensures qBitrr only starts if the dependencies are up and running
    #   - qbittorrent
    #   - radarr-1080p
    #   - radarr-4k
    #   - sonarr-1080p
    #   - sonarr-anime
    #   - overseerr
    #   - ombi

I beleive my config.yml is almost entirely the default with just the dirs and urls changed

purple-emily commented 7 months ago

Downgraded to the ":latest" docker tag and the error vanished. Something in the devlop branch causes this error.

Feramance commented 7 months ago

Only the latest branch is meant for users, the testing and nightly branches can be highly unstable. I've updated the docker snippets to show the tag for future users