redis icon indicating copy to clipboard operation
redis copied to clipboard

REDIS_ARGS in env is being ignored

Open sshquack opened this issue 2 months ago • 7 comments

Hello,

Step 1: I have the following compose file on Windows 11 latest WSL2 latest Docker desktop latest versions:

services:
  # 1. The Redis 8 Server https://hub.docker.com/_/redis
  redis:
    image: redis:8
    container_name: redis-server
    restart: unless-stopped
    ports:
      - "6379:6379"
    environment:
      - REDIS_ARGS=--appendonly yes
    volumes:
      - redis8-data:/data
    networks:
      - redis-net

volumes:
  redis8-data:

networks:
  redis-net:

Step 2: I run the compose

docker.exe compose -f 'docker\redis\docker-compose.yaml' up -d --build 

Step 3: I inspect the container logs

Starting Redis Server
1:C 11 Nov 2025 06:47:14.834 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 11 Nov 2025 06:47:14.834 * Redis version=8.2.3, bits=64, commit=00000000, modified=1, pid=1, just started
1:C 11 Nov 2025 06:47:14.834 * Configuration loaded

Step 4: I docker inspect to make sure the Env has my params

		"Env": [
			"REDIS_ARGS=--appendonly yes",
			"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
			"REDIS_DOWNLOAD_URL=https://github.com/redis/redis/archive/refs/tags/8.2.3.tar.gz",
			"REDIS_DOWNLOAD_SHA=42d4d3f037db92eea4437ba03f87627cd636ed15a1f2dde7af9650aa94b035d8"
		],

Step 5: I use the redis-cli and it says REDIS_ARGS=--appendonly yes (AOF) is not enabled:

Pinging Redis server on redis:6379
Connected.
Ready to execute commands.

> CONFIG GET appendonly
1) "appendonly"
2) "no"

Step 6: I also checked the docker volume and it only has dump.rdb. Which seems to indicate the REDIS_ARGS is being ignored.

Please help. Thank you!

sshquack avatar Nov 11 '25 06:11 sshquack

Hey @sshquack, REDIS_ARGS is only used by Redis Stack Docker images, as documented here. For the standard Redis Docker image, you can apply settings in one of two ways: either by passing arguments directly to the run command, or by using a custom config file.

adobrzhansky avatar Nov 11 '25 14:11 adobrzhansky

Thank you @adobrzhansky Passing command directly worked command: redis-server --appendonly yes --save 60 1

I have a new bug.

Step 1: Use the following compose

services:
  # 1. The Redis 8 Server https://hub.docker.com/_/redis
  redis:
    image: redis:8
    container_name: redis-server
    restart: unless-stopped
    ports:
      - "6379:6379"
    command: redis-server --appendonly yes --save 60 1
    volumes:
      - redis8-data:/data
    networks:
      - redis-net

  # 2. The RedisInsight GUI https://hub.docker.com/r/redis/redisinsight
  redisinsight:
    image: redis/redisinsight:latest
    container_name: redis-insight
    restart: unless-stopped
    ports:
      - "5540:5540"
    volumes:
      - redis-insight-data:/data
    networks:
      - redis-net
    depends_on:
      - redis
    environment:
      - RI_REDIS_HOST=redis
      - RI_REDIS_PORT=6379
      - RI_REDIS_ALIAS=Local Redis 8

volumes:
  redis8-data:
  redis-insight-data:

networks:
  redis-net:

Step 2: Start compose and go to redis insight workbench to verify

> MODULE LIST
...
2) 1) "name"
   2) "timeseries"
   3) "ver"
   4) "80200"
   5) "path"
   6) "/usr/local/lib/redis/modules//redistimeseries.so"
   7) "args"
   8) (empty list or set)
...

Step 3: Run timeseries get / set

FLUSHDB
TS.CREATE thermometer:1
TYPE thermometer:1
TS.INFO thermometer:1

Step 4: Bug where RedisInsight says "Time series data structure is not available on this database" (see screenshot) but when I use redis-cli, it works correctly. Image

How to fix this bug so I can run timeseries commands from redisinsight ?

Thank you!

sshquack avatar Nov 11 '25 16:11 sshquack

@sshquack

I couldn’t reproduce the issue with the docker-compose setup you provided.

Could you please click the (i) icon and show what Redis Insight reports about the server?

For reference: Image

Peter-Sh avatar Nov 13 '25 12:11 Peter-Sh

Hi @Peter-Sh The problem happens as soon as you restart the docker compose. Please see my full video of this problem.

https://github.com/user-attachments/assets/de63eb03-85c0-4538-818b-b09a12b370e4

I can consistently reproduce this bug every single time, so please let me know if you need any more info to debug this. Thank you!

sshquack avatar Nov 15 '25 05:11 sshquack

Hi @sshquack, I'm also wasn't able to spot any problems with the redis container itself, I think could be related to Redis Insight only and it could be worth it to double an issue in their repo https://github.com/redis/RedisInsight

adobrzhansky avatar Nov 18 '25 14:11 adobrzhansky

Hi @sshquack,

I’m from the Redis Insight team and managed to reproduce the issue using the steps you provided. Thank you for the detailed explanation!

There is indeed an issue that occurs every time — it is related to loading the Redis instance modules in the UI; they are not retrieved properly due to an issue that is unfamiliar to me at this point. We are working on it.

I have a quick workaround that should unblock you. Do the following after you encounter the issue:

  1. Navigate to databases list
Image
  1. Connect to the instance again, open in workbench and expand the TS.INFO command result

dantovska avatar Nov 18 '25 14:11 dantovska

Thank you @dantovska for looking into this issue. I will try your workaround.

sshquack avatar Nov 18 '25 18:11 sshquack

Closing this, as the Docker-related issue has been resolved and the RedisInsight part has a workaround. @sshquack, RedisInsight is also tracking this issue internally. If you eventually need to open an issue, feel free to do so in the RedisInsight repository: https://github.com/redis/RedisInsight/issues

Peter-Sh avatar Jan 08 '26 13:01 Peter-Sh