Redis, redis fatal error can't open config file
Asked Answered
N

5

14

I am running Redis on Windows and have not been able to run it using the config file.

I tried running:

redis-server 'filepath'/conf/redis.conf

but I get the error saying

"redis fatal error can't open config file"

How can I resolve this issue and have the Redis server read the config file?

Nally answered 10/4, 2017 at 17:21 Comment(0)
W
3

For windows:

redis-server "CONFIG_FILE_PATH"

Please make sure that config and log file have file read and write permission. You can also specify the config path for Linux in the same way.

Wolfhound answered 28/3, 2019 at 7:44 Comment(2)
Can you elaborate where to get the config file path?Fraternal
You can find the config files in "conf" folder under Redis installation folder. For example, C:\Program Files\Redis\conf\Wolfhound
T
2

"Fatal error, can't open config file"

Redis server might have no read privilege on this config file or config file doesn't exist.

Thyme answered 11/4, 2017 at 2:56 Comment(3)
How do I grant it privilege to read the file, if that's the case?Nally
I'm not familiar with windows. This error is caused by the line if ((fp = fopen(filename,"r")) == NULL), which means redis server can't open that file in read mode. Maybe you could google windows set file privilege .Thyme
Did it with sudo and file exist, same issueAndroid
A
2

This is an example of how I solved mine

redis-server C:/Users/<name>/Downloads/redis/64bit/redis.conf & --daemonize yes
Aglitter answered 2/8, 2020 at 16:58 Comment(0)
H
0

Don't try any command, Just double click on Redis app.

Honig answered 6/7, 2020 at 5:34 Comment(3)
This works on my mac system also. Try clicking redis-server on redis folder to start the server and the use redis-cli to enter the command panel. Finally "Ping" :)Bouley
Is this a windows specific question and answer?Sydney
yes windows specific answerHonig
T
0

Make sure the file is saved in UTF-8, if the .conf file is created from copying and pasting from the browser different unsupported encodings can be passed down to the image.

Trophozoite answered 6/8, 2023 at 17:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.