rommapp / romm

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

[Bug] Unable to login on new install #928

Closed HitarashiMiki closed 2 months ago

HitarashiMiki commented 3 months ago

RomM version 3.2.0

Describe the bug After new clear install, when I want to login, the popup says: " Unable to login: Incorrect username or password" The login/pass and secret key are all properly filled out. Tried even with default login/no pass and it doesn't work either. When inspecting the logs I saw that on Maria DB container there were some errors. I attached the logs below. I reinstalled couple of times messing with the settings and env variables, deleting volumes, etc. but nothing works.

To Reproduce Steps to reproduce the behavior:

  1. Install ROMM
  2. Login

Expected behavior User should be properly logged in.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context LOGS: _romm-db_logs.txt _romm_logs(1).txt

docker compose:

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=rommm
     - DB_USER=rommm-user
     - DB_PASSWD=<>
     - IGDB_CLIENT_ID=<>
     - IGDB_CLIENT_SECRET=<>
     - MOBYGAMES_API_KEY=<>
     - ROMM_AUTH_SECRET_KEY=<>
     - ROMM_AUTH_USERNAME=admin
     - ROMM_AUTH_PASSWORD= # default: admin
   volumes:
     - romm_resources:/romm/resources # Resources fetched from IGDB (covers, screenshots, etc.)
     - romm_redis_data:/redis-data # Cached data for background tasks
     - /mnt/ROMS/:/romm/library # Your game library
     - /mnt/ROMS/assets:/romm/assets # Uploaded saves, states, etc.
     - /mnt/ROMS/config:/romm/config # Path where config.yml is stored
   ports:
     - 8123:8080
   depends_on:
     - romm-db

 romm-db:
   image: mariadb:latest
   container_name: romm-db
   restart: unless-stopped
   environment:
     - MYSQL_ROOT_PASSWORD=<>
     - MYSQL_DATABASE=rommm
     - MYSQL_USER=rommm-user
     - MYSQL_PASSWORD=<>
   volumes:
     - mysql_data:/var/lib/mysql
gantoine commented 3 months ago

2024-06-10 18:41:10 3 [Warning] Aborted connection 3 to db: 'rommm' user: 'rommm-user' host: '172.29.0.3' (Got an error reading communication packets)

I'd suggest stopping both container, removing both, deleting the mariadb volume (to wipe all data), double-check your compose, and start from scratch. Some users have also had success with the linuxserver mariadb image, something we've added to the example compose for next release.

HitarashiMiki commented 2 months ago

obraz After changing the database to the linuxserver image:

image: lscr.io/linuxserver/mariadb:latest

Everything works fine, and ROMM started normally.