Export to GitHub

redis - issue #193

When redis-server can't open a config file, the path to the config file should be included in the error message


Posted on Mar 19, 2010 by Massive Panda

What steps will reproduce the problem? 1. Mistype the path of a config file

e.g $ redis-server /etc/redis/edis.conf

or

  1. Pass a non-existing parameter to redis-server

e.g. $ redis-server --help

What is the expected output? What do you see instead?

I would expect the error message to point to the configuration file that could not be opened, like this:

$ ./redis-server --help [4329] 19 Mar 00:53:35 # Fatal error, can't open config file '--help'

But instead only this error message is shown:

$ ./redis-server --help [4329] 19 Mar 00:53:35 # Fatal error, can't open config file

What version of the product are you using? On what operating system?

GNU/Linux (Ubuntu 9.10)

Comment #1

Posted on Mar 19, 2010 by Massive Panda

Just sent antirez a pull request on Github for this:

http://github.com/gnrfan/redis/blob/issue_193/

Comment #2

Posted on Mar 22, 2010 by Grumpy Dog

Merged, thanks

Comment #3

Posted on Oct 25, 2011 by Helpful Kangaroo

this issue was same as what i ran into. firstly,i cd /etc/init.d then entered in /etc/init.d/$,

i inputed redis-server stop or start or restart,it aways displayed "can't open a config file".anyway,i follow this one hint.added my config file path as

redis-server /etc/redis.conf,but it still doesn't work.

after some tries,i saw this one link http://stackoverflow.com/questions/6910378/stop-redis-server

then i changed the way,input commands as below cd / /etc/init.d/redis-server stop

it looks like working.

but left a issue,the other terminal window still shows some error info .

saving data faild,permission denied etc.....

very confused ,i just have already changed the "dir" from "./" to "/home/xingon/Documents/data-region"

anybody help???

Comment #4

Posted on Oct 25, 2011 by Helpful Kangaroo

and the further help tips if you received a info as "cannot touch `/var/run/redis.pid': Permission denied",you just change the command such as /etc/init.d/redis-server restart(may cause the error) the right command sudo /etc/init.d/redis-server restart

Status: Verified

Labels:
Type-Defect Priority-Medium