I-am-PUID-0 / DMB

Debrid Media Bridge
MIT License
106 stars 8 forks source link

Access riven dashboard gets 500 Internal Error #22

Closed senshinya closed 3 months ago

senshinya commented 3 months ago

Describe the bug

After initing, access riven dashboard gets 500 Internal Error

Docker Compose

version: "3.8"
services:
  DMB:
    container_name: DMB
    image: iampuid0/dmb:latest
    volumes:
      - /mnt/data/plex/DMB/config:/config
      - /mnt/data/plex/DMB/log:/log
      - /mnt/data/plex/zurg/RD:/zurg/RD
      - /mnt/data/plex/zurg/mnt:/data:shared
      - /mnt/data/plex/riven/data:/riven/backend/data
      - /mnt/data/plex/riven/mnt:/mnt
    environment:
      - TZ=Asia/Shanghai
      - ZURG_ENABLED=true
      - RD_API_KEY=xxxxxxxxxxxxxxxxx
      - RCLONE_MOUNT_NAME=real
      - RIVEN_BACKEND_ENABLED=true
      - RIVEN_FRONTEND_ENABLED=true
      - ORIGIN=http://192.168.6.148:3000
    ports:
      - 3000:3000
    devices:
      - /dev/fuse:/dev/fuse:rwm
    cap_add:
      - SYS_ADMIN
    security_opt:
      - apparmor:unconfined
      - no-new-privileges

Logs

DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | plex_watchlist.validate - Plex Watchlists is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | listrr.validate - Listrr is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | mdblist.validate - Mdblist is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | trakt.validate - Trakt is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | annatar.validate - Annatar is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | torrentio.validate - Torrentio is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | knightcrawler.validate - Knightcrawler is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | orionoid.validate - Orionoid is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | jackett.validate - Jackett is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | torbox.validate - TorBox Scraper is set to disabled
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | mediafusion.validate - Mediafusion is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | prowlarr.validate - Prowlarr is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | zilean.validate - Zilean is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | comet.validate - Comet is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | symlink.__init__ - Rclone path symlinks are pointed to: /data/real/__all__
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | symlink.__init__ - Symlinks will be placed in: /mnt
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | āœ”ļø  SUCCESS   | symlink.__init__ - Symlink initialized!
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | plex.validate - Plex Updater is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | local.validate - Local Updater is set to disabled.
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | šŸ”— DEBRID    | realdebrid.validate - Your account expires in 51 days.
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | āœ”ļø  SUCCESS   | realdebrid.__init__ - Real Debrid initialized!
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | torbox.validate - Torbox downloader is not enabled
DMB  | Jul 26, 2024 13:28:03 - WARNING - Riven_backend: | alldebrid.validate - All-Debrid is set to disabled
DMB  | Jul 26, 2024 13:28:03 - ERROR - Riven_backend: | program.initialize_services - No Requesting service initialized, you must enable at least one.
DMB  | Jul 26, 2024 13:28:03 - ERROR - Riven_backend: | program.initialize_services - No Scraping service initialized, you must enable at least one.
DMB  | Jul 26, 2024 13:28:03 - ERROR - Riven_backend: | program.initialize_services - No Updater service initialized, you must enable at least one.
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | šŸ¤– PROGRAM   | program.start - ----------------------------------------------
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | šŸ¤– PROGRAM   | program.start - Riven is waiting for configuration to start!
DMB  | Jul 26, 2024 13:28:03 - INFO - Riven_backend: | šŸ¤– PROGRAM   | program.start - ----------------------------------------------
DMB  | Jul 26, 2024 13:28:04 - INFO - Riven_backend: | šŸ‘¾ API       | main.dispatch - GET /settings/get/all - 200 - 0.00s
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | overseerr.validate - Overseerr is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | plex_watchlist.validate - Plex Watchlists is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | listrr.validate - Listrr is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | mdblist.validate - Mdblist is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | trakt.validate - Trakt is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | annatar.validate - Annatar is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | torrentio.validate - Torrentio is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | knightcrawler.validate - Knightcrawler is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | orionoid.validate - Orionoid is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | jackett.validate - Jackett is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | torbox.validate - TorBox Scraper is set to disabled
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | mediafusion.validate - Mediafusion is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | prowlarr.validate - Prowlarr is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | zilean.validate - Zilean is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | comet.validate - Comet is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - INFO - Riven_backend: | symlink.__init__ - Rclone path symlinks are pointed to: /data/real/__all__
DMB  | Jul 26, 2024 13:28:04 - INFO - Riven_backend: | symlink.__init__ - Symlinks will be placed in: /mnt
DMB  | Jul 26, 2024 13:28:04 - INFO - Riven_backend: | āœ”ļø  SUCCESS   | symlink.__init__ - Symlink initialized!
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | plex.validate - Plex Updater is set to disabled.
DMB  | Jul 26, 2024 13:28:04 - WARNING - Riven_backend: | local.validate - Local Updater is set to disabled.
DMB  | Jul 26, 2024 13:28:05 - INFO - Riven_backend: | šŸ”— DEBRID    | realdebrid.validate - Your account expires in 51 days.
DMB  | Jul 26, 2024 13:28:05 - INFO - Riven_backend: | āœ”ļø  SUCCESS   | realdebrid.__init__ - Real Debrid initialized!
DMB  | Jul 26, 2024 13:28:05 - INFO - Riven_backend: | torbox.validate - Torbox downloader is not enabled
DMB  | Jul 26, 2024 13:28:05 - WARNING - Riven_backend: | alldebrid.validate - All-Debrid is set to disabled
DMB  | Jul 26, 2024 13:28:05 - ERROR - Riven_backend: | program.initialize_services - No Requesting service initialized, you must enable at least one.
DMB  | Jul 26, 2024 13:28:05 - ERROR - Riven_backend: | program.initialize_services - No Scraping service initialized, you must enable at least one.
DMB  | Jul 26, 2024 13:28:05 - ERROR - Riven_backend: | program.initialize_services - No Updater service initialized, you must enable at least one.
DMB  | Jul 26, 2024 13:28:05 - INFO - Riven_backend: | šŸ‘¾ API       | main.dispatch - POST /settings/set - 200 - 0.82s
DMB  | Jul 26, 2024 13:28:05 - INFO - Settings saved successfully.
DMB  | Jul 26, 2024 13:28:05 - INFO - Riven_backend: | šŸ‘¾ API       | main.dispatch - POST /settings/save - 200 - 0.00s
DMB  | Jul 26, 2024 13:28:05 - INFO - Configuring Riven_frontend
DMB  | Jul 26, 2024 13:28:05 - INFO - Fetching latest riven-frontend release.
DMB  | Jul 26, 2024 13:28:06 - INFO - riven-frontend latest release: v0.2.5
DMB  | Jul 26, 2024 13:28:06 - INFO - Fetching release information from https://api.github.com/repos/rivenmedia/riven-frontend/releases/tags/v0.2.5
DMB  | Jul 26, 2024 13:28:07 - INFO - No assets found. Using zipball_url.
DMB  | Jul 26, 2024 13:28:07 - INFO - Downloading from https://api.github.com/repos/rivenmedia/riven-frontend/zipball/v0.2.5
DMB  | Jul 26, 2024 13:28:10 - INFO - Successfully downloaded rivenmedia-riven-frontend* and extracted to ./riven/frontend
DMB  | Jul 26, 2024 13:28:10 - INFO - Sucessfully downloaded the latest release for Riven_frontend
DMB  | Jul 26, 2024 13:28:10 - INFO - Automatic update disabled for Riven_frontend
DMB  | Jul 26, 2024 13:28:10 - INFO - Setting up Riven frontend
DMB  | Jul 26, 2024 13:28:20 - ERROR - The Riven frontend process is not running.
DMB  | Jul 26, 2024 13:29:21 - ERROR - The Riven frontend process is not running.
DMB  | Jul 26, 2024 13:30:05 - INFO - npm install complete
DMB  | Jul 26, 2024 13:30:05 - INFO - Starting Riven_frontend
DMB  | Jul 26, 2024 13:30:05 - INFO - Riven_frontend w/ None subprocess: Listening on 0.0.0.0:3000
DMB  | Jul 26, 2024 13:30:23 - INFO - Riven_backend: | šŸ‘¾ API       | main.dispatch - GET /services - 200 - 0.00s
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: TypeError: fetch failed
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: at node:internal/deps/undici/undici:12500:13
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: [cause]: ConnectTimeoutError: Connect Timeout Error
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: at onConnectTimeout (node:internal/deps/undici/undici:6621:28)
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: at node:internal/deps/undici/undici:6573:50
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: at Immediate._onImmediate (node:internal/deps/undici/undici:6605:13)
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: at process.processImmediate (node:internal/timers:478:21) {
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: code: 'UND_ERR_CONNECT_TIMEOUT'
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: }
DMB  | Jul 26, 2024 13:30:33 - INFO - Riven_frontend: }

It seems backend get the request: main.dispatch - GET /services - 200 - 0.00s, but somehow frontend timeout

I-am-PUID-0 commented 3 months ago

I have also noted that. It appears to occur when using the Riven UI to update the scrapers. Once the scrapers settings are saved, it appears to cause the backend to crash. I'm not sure if this is an issue related to the current release of the riven frontend - v0.2.5 - or something else... I may consider adding a process monitor to restart the processes if they crash; otherwise, try restarting the container to see if the 500 error is resolved.

Jul 26, 2024 13:31:10 - INFO - Riven_backend: | šŸ‘¾ API       | main.dispatch - GET /settings/load - 200 - 1.94s
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: TypeError: fetch failed
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: at node:internal/deps/undici/undici:12500:13
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: [cause]: Error: connect ECONNREFUSED 127.0.0.1:8080
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16) {
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: errno: -111,
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: code: 'ECONNREFUSED',
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: syscall: 'connect',
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: address: '127.0.0.1',
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: port: 8080
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: }
Jul 26, 2024 13:31:11 - INFO - Riven_frontend: }
Jul 26, 2024 13:31:26 - ERROR - The Riven backend process is not running.
senshinya commented 3 months ago

I tried the "raw" method to deploy the stack. It seems when settings have some errors or incomplete , the onboard setting page function normally. But with correct complete settings or finish the onboard settings, 500 error occurred

I-am-PUID-0 commented 3 months ago

Manually changing the Riven settings.json to include the below appears to resolve the errors:

    },
    "database": {
        "host": "sqlite:////riven/backend/data/media.db"
    }
}

DMB is supposed to be setting that automatically, but it appears to be a bug...

I-am-PUID-0 commented 3 months ago

Hopefully, this is resolved with Version [3.0.0]. If not, you can reopen this issue.

senshinya commented 3 months ago

Great, it finally works! Though every time starting docker container needs to init poetry environment, really takes a long time