[Bug] External Redis/Valkey database connects but tasks are only queued/never started
Hello there, it seems I encountered issue with using external Redis/Valkey database.
RomM version 4.4.0
Describe the bug It seems that external Valkey database is not working as intended, every scan/task I run it just gets queued but never started. If I use internal valkey database, scans/tasks starts and finish as expected.
I have tried with my own instance:
valkey: container_name: Valkey hostname: valkey image: docker.io/valkey/valkey:8-bookworm restart: unless-stopped user: 1027:65536 command: [ "bash", "-c", ' docker-entrypoint.sh --dbfilename Valkey.rdb --appendonly yes --appendfilename Valkey.aof --requirepass "$$(cat $$REDIS_PASS_FILE)" --maxmemory 2048mb --maxmemory-policy noeviction ' ] security_opt: - no-new-privileges:true secrets: - source: valkey_default_password target: /run/secrets/valkey_default_password sysctls: net.core.somaxconn: 511 volumes: - /Docker/Valkey/Data:/data:rw - /Docker/Valkey/Config:/usr/local/etc/redis:rw - /etc/localtime:/etc/localtime:ro environment: TZ: $TZ REDIS_PASS_FILE: /run/secrets/valkey_default_password
REDIS_HOST: valkey
REDIS_PORT: 6379
REDIS_USERNAME_FILE: default
REDIS_PASSWORD_FILE: /run/secrets/valkey_default_password
REDIS_DB: 3
REDIS_SSL: false
and the one provided with the docker compose example, so just: romm-valkey-dev: image: valkey/valkey:8 container_name: romm-valkey-dev restart: unless-stopped env_file: .env ports: - "${REDIS_PORT:-6379}:6379"
and updated RomM with corresponding value. In both cases, external database connects but tasks are just queued and never started.
To Reproduce Steps to reproduce the behavior:
Deploy RomM instance with external database, see tasks/scans just queusing and never starting
Expected behavior Scans/tasks performs exactly the same as with internal database. (all Redis env commented out)
Ooh fun one! I use redis and it's working fine, but i'll spin up a matching valkey instance to test later this week.
I'm also using an external valkey with v4.4.0, but I'm not using a username/password from RomM. Using v9.0.0 currently, but it was working with v8.4.1 prior to this too:
romm-cache:
image: valkey/valkey:9.0.0-alpine # https://hub.docker.com/r/valkey/valkey
container_name: romm-cache
hostname: romm-cache
deploy:
resources:
limits:
cpus: "0.25"
memory: "256M"
environment:
VALKEY_EXTRA_FLAGS: "--save 60 1 --loglevel warning"
healthcheck:
interval: 30s
retries: 3
start_period: 30s
test: [ "CMD", "valkey-cli", "ping" ]
timeout: 5s
networks:
- home
restart: unless-stopped
user: "${PUID_ROOT:?User ID missing}:${PGID_ROOT:?Group ID missing}"
volumes:
# Persistent volumes
- ./storage/romm-cache/data/:/data
And the redis environment variables for the RomM container:
# Cache config
REDIS_HOST: "romm-cache"
REDIS_PORT: "6379"
Merging this into #2657