The reason for the exception "ERR Client sent AUTH, but no password is set" appears when the Java link Redis and its solution __java

Source: Internet
Author: User
Tags auth redis redis server
Causes and solutions to "ERR Client sent AUTH, but no password is set" exception when Java link Redis

"Error Tip"

Redis.clients.jedis.exceptions.JedisConnectionException:Could not get a resource from the pool
At Redis.clients.util.Pool.getResource (pool.java:53)
At Redis.clients.jedis.JedisPool.getResource (jedispool.java:226)
At Cn.hncu.RedisPool.getJedis (redispool.java:66)
At Cn.hncu.RedisJava.main (redisjava.java:15)
caused By:redis.clients.jedis.exceptions.JedisDataException:ERR Client sent AUTH, but no password is set
At Redis.clients.jedis.Protocol.processError (protocol.java:127)
At Redis.clients.jedis.Protocol.process (protocol.java:161)
At Redis.clients.jedis.Protocol.read (protocol.java:215)
At Redis.clients.jedis.Connection.readProtocolWithCheckingBroken (connection.java:340)
At Redis.clients.jedis.Connection.getStatusCodeReply (connection.java:239)
At Redis.clients.jedis.BinaryJedis.auth (binaryjedis.java:2139)
At Redis.clients.jedis.JedisFactory.makeObject (jedisfactory.java:108)
At Org.apache.commons.pool2.impl.GenericObjectPool.create (genericobjectpool.java:868)

"Cause of the problem"
The Redis server did not set a password, but the client sent it a auth (authentication, authentication) request.

"Workaround" determines which configuration file is specified when Redis is started.


If the image above is a redis.windows.conf file, open the file with the text Editing tool, find "Requirepass", and remove the annotation to set the password.


Save after editing, restart Redis, and then run the program, OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.