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.