Trouble using Upstart to launch Redis as redis user
Posted
by
Chris
on Super User
See other posts from Super User
or by Chris
Published on 2012-06-19T14:34:56Z
Indexed on
2012/06/19
15:18 UTC
Read the original article
Hit count: 860
I'm trying to launch redis-server as a user (called redis) via Upstart. My /etc/init/redis-server.conf looks like this:
description "redis server"
start on runlevel [23]
stop on shutdown
exec sudo -u redis /usr/local/bin/redis-server /var/lib/redis/redis.conf
Looks good, right? I start redis-server using
$start redis-server
redis-server start/running, process 16808
$redis-cli
Could not connect to Redis at 127.0.0.1:6379: Connection refused
$ps ax | grep ps 168
16810 tty1 R+ 0:00 ps ax
16811 tty1 S+ 0:00 grep 168
So redis-server definitely isn't running. Let's try executing the Upstart command by hand, shall we?
exec sudo -u redis /usr/local/bin/redis-server /var/lib/redis/redis.conf
[16852] 19 Jun 10:37:21 # Can't chdir to './': Permission denied
Connection to 10.19.2.94 closed.
And then I get logged off. I'm at a loss. Any ideas?
© Super User or respective owner