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).
You have to manually edit the start/stop-service script:
Find the following line:
And replace it with the following 'changeit' is where your password goes:
Now you should be able to start and stop the service without any problems.
On Amazon EC2 instance I could restart local Redis like this:
sudo /etc/init.d/redis restart
P.S. If you are using Redis Authentication you have to pass
-a <pass>
parameter.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 (replacepassword
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 withrequirepass
- whatever value is next to it, is the password.