Error NOAUTH Authentication required while Accessing Redis

Error NOAUTH Authentication required while Accessing Redis

When you’re trying to ping or access the Redis CLI. Sometimes you must have seen “error noauth authentication required” on the Redis server. This will occur when you have set the password on the Redis server to protect from unauthorized access. 

You need to check the below steps to solve these issues.

Check Out: Install Tweak Tool On Ubuntu 20.04 LTS Local Fossa Linux

Step 1: we need to check if you have enabled the requirepass parameter in redis.conf file, uncomment the parameters and restart the Redis service.

Step 2: if you have bind any IP address in the configuration file, using bind IPAddress, you can also allow the local IP address with it using bind 127.0.0.1 IPAddress

Restart the service and check Now both localhost and New IPAddress should be listening on port 6379.

[[email protected] ~]# netstat -tnlp | grep redis
tcp   0  0  127.0.0.1:6379        0.0.0.0:* LISTEN   39412/redis-server 
tcp   0  0  192.168.185.147:6379  0.0.0.0:* LISTEN   39412/redis-server

Step 3: you must have Redis CLI installed. Now we will check and try to log in to Redis using the following commands.

Check Out: How To Install and Configure Tor Browser On Ubuntu

As you can there’s no problem we have and we can also log in directly from the terminal bypassing the password.

[[email protected] ~]# redis-cli
127.0.0.1:6379> auth redistest
OK
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379>
[[email protected] ~]# redis-cli -h 192.168.185.147 -p 6379 -a redistest
192.168.185.147:6379>

Step 4: Make sure Port 6379 is opened in the firewall rules. 

[[email protected] ~]# firewall-cmd --permanent --add-port=6379/tcp
success
[[email protected] ~]# firewall-cmd --reload
success

 

You’re done

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment