Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis::CommandError: ERR Client sent AUTH, but no password is set

This has to be some wrong config

I installed redis on localhost.

When trying to connect to it through Rails console

Redis.new(:host => 'localhost', :port => 6379)

I can't send commands and I get

Redis::CommandError: ERR Client sent AUTH, but no password is set

I don't recall setting a password, nor do I know where to see if a password has been set

if I use a different URL (like rediscloud or redistogo) I can send commands (setting the password accodingly)

From what I understand the error says that I am sending a password, but redis doesn't have a password. But, as you can see, I am not setting any password..

Is there a way to debug this?

like image 802
Nick Ginanto Avatar asked Oct 14 '14 08:10

Nick Ginanto


People also ask

How do I authenticate Redis?

To enable authentication on an existing Redis server, call the ModifyReplicationGroup API operation. Call ModifyReplicationGroup with the --auth-token parameter as the new token and the --auth-token-update-strategy with the value ROTATE.

What is default Redis password?

Following example shows the steps to secure your Redis instance. By default, this property is blank, which means no password is set for this instance. You can change this property by executing the following command.

How use Redis AUTH command?

Redis AUTH command is used to authenticate to the server with the given password. If the password matches the password in the configuration file, the server replies with the OK status code and starts accepting commands. Otherwise, an error is returned and the clients needs to try a new password.


1 Answers

You can debug you client's communication from Redis' side by using the MONITOR command. MONITOR provides a stream of the commands that Redis processes, so if your Ruby client issues and uncalled-for AUTH you'll be able to catch it there.

like image 72
Itamar Haber Avatar answered Sep 20 '22 03:09

Itamar Haber