Redis raise error: NOAUTH Authentication required but there is no password setting

依然范特西╮ 提交于 2019-11-28 19:09:46

We also faced a similar issue. Looks like someone went and scanned AWS and connected to all public redis and possibly ran "CONFIG SET REQUIREPASS ''", thus locking down the running instance of redis. Once you restart the redis, the config is restored to normal.

Best thing would be to use AWS security group policy and block port 6379 for public.

haren

I had the same issue (running on AWS) and discovered our redis port was exposed. You probably had the same. Someone was messing around.

EDIT: The solution: reset your redis password and then (assuming you have it running as a service) restart the service providing the new password

Son Nguyen

I Have the same problem. after that I'm set requirepass for the redis server.
And add that password in initializer/redis.rb

$redis = Redis.new(:password=>"****") 

It works fine

Had the exact same problem running Redis on an AWS instance. I would restart redis-server without any password requirements (#requirepass ''), would work fine for a few hours, then would throw "NOAUTH Authentication required" and eventually would have to restart redis-server.

Checked the Security Groups settings in AWS for the instance and saw port 6379 open to the public (0.0.0.0/0). We limited the port access to our only server that needs to access and haven't seen the issue come up ever since!

P.S. This is my first ever contribution to StackOverflow. Thanks for the help!

If you have made any changes in configuration file then don't forget to restart redis service with sudo service redis-server restart command.

Edit: If you are running redis service in production mode then redis requires password to run. For that you need to set password in your config file present at /etc/redis.

You need to set requirepass ******* in that file under ########### SECURITY ############ section.

Then restart your server sudo service redis-server restart.

After that add that password in your config or initializer file where you have set your hostname and port. Example:

$redis = Redis.new(:host => 'localhost', :port => 6379, :password => "*******")

I Have the same problem, I found it's caused by someone started redis by another redis.cnf configure file, So I stoped redis-server and then started redis-server specify a configure file.

redis-server /etc/redis.cnf

Then every thing works fine.

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