Describe the bug
Launching redis using the example redis.conf results in the following error: *** FATAL CONFIG FILE ERROR (Redis 6.2.6) *** Reading the configuration file, at line 1377
'appenddirname "/var/lib/redis"' Bad directive or wrong number of arguments
It's important to note the issue occurs even with the default example text in the redis.conf:
*** FATAL CONFIG FILE ERROR (Redis 6.2.6) *** Reading the configuration file, at line 1377
'appenddirname "appendonlydir"' Bad directive or wrong number of arguments
To reproduce
Launch Redis with the following in your docker-compose.yml: redis: image: redis:alpine command: ["redis-server", "/usr/local/etc/redis/redis.conf"] volumes: - $PWD/redis-data:/var/lib/redis - $PWD/redis.conf:/usr/local/etc/redis/redis.conf
Expected behavior
Redis should launch while referencing redis.conf and not crash with error
Additional information
I've tried the following: appenddirname "/var/lib/redis" appenddirname /var/lib/redis appenddirname "appendonlydir"
As I comment out settings that cause redis to fail such as appenddirname, I continue to find the 'next' setting that causes redis to fail, in this case commenting out appenddirname lets redis get further but then it fails on this setting:
*** FATAL CONFIG FILE ERROR (Redis 6.2.6) *** Reading the configuration file, at line 1479
'aof-timestamp-enabled no' Bad directive or wrong number of arguments
I won't continue to post bugs for each setting that Redis fails on, I do believe each is a bug however as the above is using the correct number of arguments as far as I can tell.
Suggested improvement to appenddirname explanation text in redis.conf: While I believe the appenddirname issue is a bug due to it happening no matter how I format the setting, in the comments above the appendirname, please indicate the required format of the appendirname setting using an example. It's ambiguous whether quotes should be included, if a path is required, or a single word for the folder name such as the example shows. Further, many configuration settings in redis.conf do not have quotes around the setting provided in redis.conf, however appendirname does, which is confusing. A simple example will make it so anyone looking at the setting will know how to input the answer.
Lastly it would be ideal if redis would execute successfully using the provided redis.conf from the GitHub repo without modification, modifying the provided redis.conf would then be optional.
Comment From: enjoy-binbin
please take a look in https://github.com/redis/redis/issues/10316#issuecomment-1046172359
Comment From: infrachris
Closing
Comment From: leos-code
redis.conf version incorrect