hiddenid01 / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

redis-server 2.0.4 hangs OS X 10.6.6, caused by incorrect file permissions #492

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of Redis you are using, in what kind of Operating System?
Redis 2.0.4 installed via Homebrew on Mac OS X 10.6.6

What is the problem you are experiencing?
Permissions on /usr/local/var/db/redis are incorrect which causes redis-server 
to start in Error state and crash the whole system! Spinning ball of death.

What steps will reproduce the problem?
Install homebrew, http://mxcl.github.com/homebrew/
brew install redis

Do you have an INFO output? Please past it here.
uname -a
Darwin Nuoa.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 
2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 i386

ps -aux | grep redis
USER       PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
gawin      389   0.0  0.0        0      0   ??   E    9:46AM   0:00.00 
(redis-server)

tail -f /usr/local/var/log/redis.log
[211] 22 Mar 09:45:24 # SIGTERM received but errors trying to shut down the 
server, check the logs for more information
[211] 22 Mar 09:45:24 # User requested shutdown, saving DB...
[211] 22 Mar 09:45:24 # Failed saving the DB: Permission denied
[211] 22 Mar 09:45:24 # Error trying to save the DB, can't exit
* and this keeps repeating every second. killing the redis-server with 'sudo 
kill 389' also fails.

Please provide any additional information below.
Fix:
sudo chmod 755 /usr/local/var/db/redis
sudo touch /usr/local/var/db/redis/dump.rdb
sudo chmod 644 /usr/local/var/db/redis/dump.rdb
sudo touch /usr/local/var/db/redis/appendonly.aof
sudo chmod 644 /usr/local/var/db/redis/appendonly.aof

now restart:

ps -aux | grep redis
USER       PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
gawin      212   0.0  0.0  2435860   1220   ??  S     9:53AM   0:00.25 
/usr/local/Cellar/redis/2.0.4/bin/redis-server /usr/local/etc/redis.conf

Original issue reported on code.google.com by m%il.gaw.in@gtempaccount.com on 22 Mar 2011 at 9:15

GoogleCodeExporter commented 9 years ago
This is a homebrew issue. It should set the correct permissions on install. 
Thanks for the detailed report though!

Original comment by pcnoordh...@gmail.com on 22 Mar 2011 at 9:32

GoogleCodeExporter commented 9 years ago
Submitted (and I fixed it) on github:
https://github.com/mxcl/homebrew/issues/4805

Original comment by m%il.gaw.in@gtempaccount.com on 22 Mar 2011 at 10:42