Can't open the append-only file

3,735 views
Skip to first unread message

maivanha1610

unread,
Dec 8, 2010, 3:05:59 AM12/8/10
to Redis DB
Hi
I've installed antirez-redis-2.2-alpha6-1-gbbac56c in my system, it
run ok.
But when I create service by command:

cd /opt
wget http://library.linode.com/databases/redis/reference/init-rpm.sh
mv /opt/init-rpm.sh /etc/init.d/redis2
chmod +x /etc/rc.d/init.d/redis /etc/init.d/redis2
touch /var/log/redis.log
chown redis:redis /var/log/redis.log
chkconfig --add redis2
chkconfig redis2 on

with file /etc/init.d/redis i prepare :

#!/bin/sh
#
# redis this script starts and stops the mongodb daemon
#
# chkconfig: - 85 15
# description: redis is a non-relational database storage system.
# processname: redis
# config: /opt/redis/redis.conf
# binary: /opt/redis/redis-server

PATH=/opt/redis:/sbin:/bin:/usr/sbin:/usr/bin
NAME=redis2

test -x $DAEMON || exit 0

set -e

case "$1" in
start)
echo -n "Starting Redis... "
su - redis -c "/usr/local/bin/redis-server /opt/antirez-redis/
redis.conf"
;;
stop)
echo -n "Stopping Redis"
killall /usr/local/bin/redis-server
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop}" >&2
exit 1
;;
esac

exit 0


after that I run redis with command:
redis2 start

--> have error occur :
Can't open the append-only file: Permission denied

In redis 2.0 have config for "append-only file" in redis.conf file,
but in version 2.2 I don't see.

Could you tell me how to fix this problem?

Pieter Noordhuis

unread,
Dec 8, 2010, 4:16:48 AM12/8/10
to redi...@googlegroups.com
When this kind of script fails, you can try to su as the target user and try to run the command you're trying to run. You'll see that the configuration is not picked up, which makes the target directory for Redis (to write dump and/or append-only file) its current working directory.

The first argument to redis-server should be the location of the configuration file, not a directory.

Cheers,
Pieter


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.


Reply all
Reply to author
Forward
0 new messages