rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
2.45k stars 100 forks source link

[BUG] App crashes when i scan library #772

Closed eimparas closed 2 months ago

eimparas commented 8 months ago

RomM version RomM 3.0.3

Describe the bug Did a clean install of RomM on my macine , using the supplied compose file tweeked to my needs

version: "3"

volumes:
  mysql_data:
  romm_resources:
  romm_redis_data:

services:
  romm:
    image: rommapp/romm:latest
    container_name: romm
    restart: unless-stopped
    environment:
      - DB_HOST=romm-db
      - DB_NAME=romm # Should match MYSQL_DATABASE in mariadb
      - DB_USER=romm-user # Should match MYSQL_USER in mariadb
      - DB_PASSWD=p@ssw0rd  # Should match MYSQL_PASSWORD in mariadb
      - IGDB_CLIENT_ID=j  # Generate an ID and SECRET in IGDB
      - IGDB_CLIENT_SECRET=t  # https://api-docs.igdb.com/#account-creation
      - MOBYGAMES_API_KEY=moby   # https://www.mobygames.com/info/api/
      - ROMM_AUTH_SECRET_KEY=  # Generate a key with `openssl rand -hex 32`
      - ROMM_AUTH_USERNAME=admin
      - ROMM_AUTH_PASSWORD=admin # default: admin
    volumes:
      - /DockerData/RomManager/resources:/romm/resources # Resources fetched from IGDB (covers, screenshots, etc.)
      - /DockerData/RomManager/redis_data:/redis-data # Cached data for background tasks
      - /mnt/GameVault/TempRoms:/romm/library/roms # Your game library
      - /DockerData/RomManager/assets:/romm/assets # Uploaded saves, states, etc.
      - /DockerData/RomManager/config:/romm/config # [Optional] Path where config.yml is stored
    ports:
      - 84:8080
    depends_on:
      - romm-db

  romm-db:
    image: mariadb:latest
    container_name: romm-db
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=r00tP@as # Use a unique, secure password
      - MYSQL_DATABASE=romm
      - MYSQL_USER=romm-user
      - MYSQL_PASSWORD=p@ssw0rd
    volumes:
      - /DockerData/RomManager/mysql_data:/var/lib/mysql

config.txt

wrote this config file and proccedd to scan my library (about 250GB of roms if this matters) the web interface would be stuck on the loading and be inresponsive ... i did a ctrl+R and i got back to the library , there were added 2-3 platforms and i was able to click on them , but they would all say : image . IF i went manualy to scan for the game on IGDB for example it would find it or i could import it via the IGDB id ..

To Reproduce Steps to reproduce the behavior:

After finishing making the docker mounts, folder structure tweeks on the config.yaml

  1. Go to 'Library'
  2. Check Complete rescan , Rescan Unidentifed, Click on `SCAN'
  3. hang tight till it becomes unresponsive.
  4. Observe browser logs for erros like : 403 forbiden

Expected behavior Scan the game library, import it , import details from IGDB Screenshots image

Desktop (please complete the following information):

Server

Server: Engine: Version: 20.10.5+dfsg1 API version: 1.41 (minimum version 1.12) Go version: go1.15.15 Git commit: 363e9a8 Built: Mon May 30 18:34:49 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.13~ds1 GitCommit: 1.4.13~ds1-1~deb11u4 runc: Version: 1.0.0~rc93+ds1 GitCommit: 1.0.0~rc93+ds1-5+deb11u3 docker-init: Version: 0.19.0 GitCommit: runnin on debian 12

Additional context

_romm_logs.txt

gantoine commented 8 months ago

Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

It's possible the folder /DockerData/RomManager/redis_data may not have the right perms for redis-in-romm to write to it. You'll want to check the perms on that folder, change them so the internal user has access.

eimparas commented 8 months ago

Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

It's possible the folder /DockerData/RomManager/redis_data may not have the right perms for redis-in-romm to write to it. You'll want to check the perms on that folder, change them so the internal user has access.

i leave docker to create the folders under /DockerData , this usualy assists not running into those premmision erros .

this is the premisions that the folders have :

drwxr-xr-x  2 root             root             4.0K Mar 26 22:29 assets
drwxr-xr-x  2 root             root             4.0K Mar 29 19:19 config
drwxr-xr-x  6 systemd-coredump systemd-coredump 4.0K Mar 26 22:30 mysql_data
drwxr-xr-x  2 root             root             4.0K Mar 26 22:29 redis_data
drwxr-xr-x  2 root             root             4.0K Mar 26 22:29 resources
gantoine commented 8 months ago

How come you're not using the volumes romm_redis_data and romm_resources?

In any case this like likely the permission bug we've seen on 3.0.3, and will be fixed in 3.1. You can wait a couple days or try chmod 777 on those folders.

eimparas commented 8 months ago

How come you're not using the volumes romm_redis_data and romm_resources?

i found the compose file here in the repo & setup instructions, tweeked it to my needs. (save presistent data on my /DockerData and "read" the roms from my rom storage ...

did i set up anything wrong?

gantoine commented 8 months ago

So you compose seems fine! There's a chance this will start working again when the 3.1 RC is released in a bit, report back here when it does and you've had a chance to try it.

eimparas commented 8 months ago

So you compose seems fine! There's a chance this will start working again when the 3.1 RC is released in a bit, report back here when it does and you've had a chance to try it.

I shall wait then !

gantoine commented 4 months ago

Hey @eimparas did you ever get this working with 3.2.0?

eimparas commented 4 months ago

@gantoine I havent got to it yet . I plan a server upgrade thus all my secondary services that have in some shape failed are left till the upgrade where i plun to got arround to fix it ..

Its in my todo list tho