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

匿名 (未验证) 提交于 2019-12-03 08:39:56

问题:

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?

回答1:

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.



回答2:

I got same Issue and it was that am trying to connect while no password had been set on radis server and my code was sending the pass as null

edit redis.conf and setting a password fix it

requirepass pass_here 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!