Redis Exception Resolution: Jedis.exceptions.JedisDataException:ERR Client sent AUTH, but no password is set

Source: Internet
Author: User
Tags auth redis

Project to do separation, the previous operation of the project to do a separate processing, the original Redis cache naturally to separate, to avoid maximizing the impact of changes on the function, for caching the database is just a separate project Redis library (database)

This redis is stated in the Spring.xml configuration.

<bean id= "Jedispool" class= "Redis.clients.jedis.JedisPool" >
	<constructor-arg ref= "Jedispoolconfig"/ >
	<constructor-arg value= "${redis.ip}"/>
    	<constructor-arg value= "${redis.port}"/>
    	<constructor-arg value= "${redis.timeout}"/>
    	<constructor-arg value= "${redis.database}"/>
</bean>
Next in the development of the service test, cache processing times are wrong, as the title sees Jedis.exceptions.JedisDataException:ERR Client sent AUTH, but no password is set

In Csdn to find some of our predecessors to solve the experience, links

It only mentions password access, and no profile startup, and does not solve my problem very well (multiple Redis ports under the same server cannot be started without configuration files)

Since I am a password-free access, I have referred to the old project after the discovery of such a solution

<bean id= "Jedispool" class= "Redis.clients.jedis.JedisPool" >
	<constructor-arg ref= "Jedispoolconfig"/ >
	<constructor-arg value= "${redis.ip}"/>
    	<constructor-arg value= "${redis.port}"/>
    	<constructor-arg value= "${redis.timeout}"/>
    	<constructor-arg ><null/></constructor-arg >
    	<constructor-arg value= "${redis.database}"/>
</bean>
It's just an extra line.
<constructor-arg ><null/></constructor-arg>
To bring my service back to the dead, magical magic, my guess is that this line of position is exactly the location of the password, the incoming null is exactly the corresponding password-free access, so that the process continues.

Writing programs can not only look at the results, but also to understand the process, the above is just perfect service, only when I really understand the process to have a better editor.

Also hope that you peer to guide ~


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.