I am trying to shutdown my redis-server from a redis-cli. Whenever I issue a command from a client I receive the error "(error) NOAUTH Authentication required." I have tried the commands "SHUTDOWN" and "SHUTDOWN NOSAVE".
I have also tried "redis-server stop" from another terminal window but received the error "# Fatal error, can't open config file 'stop'"
How can I shut down this server? (I am on OSX).
Your Redis server is configured with a password apparently. Therefore, when using redis-cli, you'll need to issue the AUTH password
command before any other command or else you'll be getting that error message (replace password
with your server's password).
Alternatively, you can invoke redis-cli
with the -a
switch followed by your password for the same result.
To find the password of your server, open the Redis configuration file (by default /etc/redis/6379.conf
) and look for the line starting with requirepass
- whatever value is next to it, is the password.
1. redis-cli
2. auth yourpassword
3. shutdown
4. sudo service redis_6379 start
You have to manually edit the start/stop-service script:
sudo vi /etc/init.d/redis_6379
Find the following line:
$CLIEXEC -p $REDISPORT shutdown
And replace it with the following 'changeit' is where your password goes:
$CLIEXEC -p $REDISPORT -a changeit shutdown
Now you should be able to start and stop the service without any problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With