Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis: NOAUTH Authentication required but there is no password setting

I got error NOAUTH Authentication required when I connect to Redis server via command: redis-cli and run ping to check if Redis is working.

I found answer for NOAUTH Authentication required error which describes that this error only happens when Redis is set a password, but I checked Redis config file at etc/redis/redis.conf and there is no password setting.

Redis config

Does anyone know that if there are other settings which can cause this error? Thanks for any help.

p/s: I am using Ruby on Rails web framework, Redis database is used for Sidekiq.

Edited: Redis version is 2.8.4. Server is hosted on AWS.

Currently, I decided to set a password for Redis server so that it can not be set password when it is running.

(When Redis server is restarted, it will work normal. You can run sudo service redis-server restart to restart Redis server.)

like image 540
Thanh Avatar asked Dec 06 '15 07:12

Thanh


People also ask

What is Noauth Authentication required?

How we fix Redis NOAUTH authentication required error? Usually, this error occurs when the Redis server has a password configured. If we set the requirepass directive, it will cause the server to require password authentication.

What is the default password for Redis?

Starting Redis By default, the port is 6379 and there is no password.


1 Answers

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

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

like image 67
Ashutosh Agrawal Avatar answered Oct 09 '22 02:10

Ashutosh Agrawal