Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Outdated redis.conf file prevents app from starting #15737

Closed
jswartwood opened this issue Oct 29, 2012 · 5 comments
Closed

Outdated redis.conf file prevents app from starting #15737

jswartwood opened this issue Oct 29, 2012 · 5 comments

Comments

@jswartwood
Copy link

After updating to Redis 2.6.2 I started seeing:

/usr/local/bin/redis-server /usr/local/etc/redis.conf

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 375
>>> 'vm-enabled no'
Bad directive or wrong number of arguments

The reason for this is because I had at one point an old redis install and thus an old redis.conf file. The brew formula will not overwrite this file as it upgrades to new versions. The lack of updates could be a problem, though I'm not sure what a perfect solution would be. Perhaps checking to see if it has been edited as compared to the version generated via the last install (and allowing overwrite in that case); only disable overwrite if the user has manually changed this file. That is obviously not a flawless solution either. Perhaps a simple disclaimer would be best.

My interim solution was to remove redis.conf via:

rm /usr/local/etc/redis.conf

...and just reinstall redis via brew.

@jswartwood
Copy link
Author

There really may not be an action associated with this issue if there is no clear "solution" to this issue, but if nothing else, I wanted to post a fix for anyone else that comes across this problem.

Feel free to close if NOOP is appropriate.

@MikeMcQuaid
Copy link
Member

The perfect solution would be to keep a hash of the original etc files, replace them if unchanged and if changed notify the user and install the new file to redis.conf.new. I'll get on this at some point.

@jswartwood
Copy link
Author

That would be marvelous. Thanks @MikeMcQuaid

I guess that it is worth stating for bug reporting posterity (SEO) that redis auto-loading failed silently. So if redis fails to load on startup for anyone this may be the culprit. First try running /usr/local/bin/redis-server /usr/local/etc/redis.conf to see if your output matches above.

@MikeMcQuaid
Copy link
Member

Fixed properly in 8de552e. The etc stuff will be discussed in #15751.

snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
@hieuvo
Copy link

hieuvo commented Aug 30, 2013

I had same problem, with default repositories, I installed 2.2 version later I download 2.6 version from redis official website and manually install it. When I run

redis-server /etc/redis/redis.conf

it returns the same error, just remove 2.2 version and reinstall 2.16 version, it worked.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants