Redis, redis fatal error can't open config file

17,576

Solution 1

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.

Solution 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.

Solution 3

This is an example of how I solved mine

redis-server C:/Users/<name>/Downloads/redis/64bit/redis.conf & --daemonize yes
Share:
17,576

Related videos on Youtube

Mustard Tiger
Author by

Mustard Tiger

Updated on June 04, 2022

Comments

  • Mustard Tiger
    Mustard Tiger over 1 year

    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?

  • Mustard Tiger
    Mustard Tiger over 6 years
    How do I grant it privilege to read the file, if that's the case?
  • lorneli
    lorneli over 6 years
    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 .
  • Ilan
    Ilan over 5 years
    Did it with sudo and file exist, same issue
  • Ahmed Saleh
    Ahmed Saleh over 4 years
    Can you elaborate where to get the config file path?
  • Aniket Panchal
    Aniket Panchal over 4 years
    You can find the config files in "conf" folder under Redis installation folder. For example, C:\Program Files\Redis\conf\
  • Saurabh
    Saurabh about 3 years
    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" :)
  • lacostenycoder
    lacostenycoder over 1 year
    Is this a windows specific question and answer?
  • saurabh kumar
    saurabh kumar over 1 year
    yes windows specific answer