romm icon indicating copy to clipboard operation
romm copied to clipboard

[Bug] Fresh install - MariaDB fails to install (Synology NAS)

Open chris-m92 opened this issue 1 year ago • 1 comments

RomM version latest

Describe the bug When attempting to create the stack in Portainer, the installation for MariaDB hangs due to permissions errors. I've tried setting user, PUID, PGID, etc... but for some reason, mariaDB is unable to write to the defined bind volume.

Notes:

  • Following the Synology NAS installation instructions (which does use bind volumes for mariaDB).
  • I had to remove depends_on just to get the stack to build and get to logs, otherwise Portainer fails to create the stack due to unhealthy container.
  • I'm stuck on an EOL version of Docker (Thanks Syno).
  • I'm using the default created bridge network that Portainer auto-creates

To Reproduce Steps to reproduce the behavior:

  1. Download the example docker-compose.yml
  2. Follow Synology NAS install instructions
  3. Build stack with Portainer
  4. ?
  5. MariaDB fails to install

docker-compose.yml

version: "3"

services:
  romm:
    image: rommapp/romm:latest
    container_name: romm
    restart: unless-stopped
    environment:
      - DB_HOST=romm-db
      - DB_NAME=romm # Should match MARIADB_DATABASE in mariadb
      - DB_USER=romm-user # Should match MARIADB_USER in mariadb
      - DB_PASSWD=${DB_PASSWORD}
      - ROMM_AUTH_SECRET_KEY=${SECRET_KEY}
      - IGDB_CLIENT_ID=${CLIENT_ID}
      - IGDB_CLIENT_SECRET=${CLIENT_SECRET}
      # - MOBYGAMES_API_KEY= # https://docs.romm.app/latest/Getting-Started/Generate-API-Keys/#mobygames
      # - STEAMGRIDDB_API_KEY= # https://docs.romm.app/latest/Getting-Started/Generate-API-Keys/#steamgriddb
      # - SCREENSCRAPER_USER= # Use your ScreenScraper username and password
      # - SCREENSCRAPER_PASSWORD= # https://docs.romm.app/latest/Getting-Started/Generate-API-Keys/#screenscraper
      # - RETROACHIEVEMENTS_API_KEY= # https://api-docs.retroachievements.org/#api-access
    volumes:
      - /volume1/Docker/.../romm_resources:/romm/resources # Resources fetched from IGDB (covers, screenshots, etc.)
      - /volume1/Docker/.../romm_redis_data:/redis-data # Cached data for background tasks
      - /volume1/Docker/.../library:/romm/library # Your game library. Check https://github.com/rommapp/romm?tab=readme-ov-file#folder-structure for more details.
      - /volume1/Docker/.../assets:/romm/assets # Uploaded saves, states, etc.
      - /volume1/Docker/.../config:/romm/config # Path where config.yml is stored
    ports:
      - 20703:8080
    # depends_on:
    #   romm-db:
    #     condition: service_healthy
    #     restart: true

  romm-db:
    image: mariadb:latest
    container_name: romm-db
    restart: unless-stopped
    environment:
      - MARIADB_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
      - MARIADB_DATABASE=romm
      - MARIADB_USER=romm-user
      - MARIADB_PASSWORD=${DB_PASSWORD}
    ports:
      - 3309:3306
    volumes:
      - /volume1/Docker/.../mysql_data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      start_period: 30s
      # start_interval: 10s
      interval: 30s
      timeout: 5s
      retries: 5

romm-db logs

Installation of system tables failed!  Examine the logs in
/var/lib/mysql/ for more information.
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
    shell> /usr/bin/mariadb-install-db --defaults-file=~/.my.cnf
You can also try to start the mariadbd daemon with:
    shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &
and use the command line tool /usr/bin/mariadb
to connect to the mysql database and look at the grant tables:
    shell> /usr/bin/mariadb -u root mysql
    MariaDB> show tables;
Try '/usr/sbin/mariadbd --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql/ that may be helpful.
The latest information about mariadb-install-db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the MariaDB discuss email list at https://lists.mariadb.org/postorius/lists/discuss.lists.mariadb.org/
Please check all of the above before submitting a bug report
at https://mariadb.org/jira

Desktop (please complete the following information):

  • OS: Synology DSM 7.2.2u2
  • Browser: Chrome
  • Portainer (Docker engine 20.10.23 [API:1.41])

chris-m92 avatar Jul 03 '25 02:07 chris-m92

This sounds like a filesystem permissions issue. Try to check the mount path where mariadb is trying to be created.

If you need further help with it join our discord and we can troubleshoot better there.

zurdi15 avatar Jul 03 '25 06:07 zurdi15