in source file I set spring.redis.password in application.yml. I deploy to the product environment.Load the spring-config not have the password.But the programe still call the redis auth method. The spring-config not clear the source appication.yml redis password config.Use the spring-config current property
Comment From: wilkinsona
Thanks for the report, @loftgame. Unfortunately, I don’t understand the description of the problem. Could you please provide a small sample with a failing test that shows things not working as you expect them to?
Comment From: loftgame
develop environment : .
product environment: . notice .the server have no redis password. The profile load by spring-config . but the console log show .It's still use the redis auth method. Caused by: 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 redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:194) ... 123 common frames omitted 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) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) at redis.clients.util.Pool.getResource(Pool.java:49) ... 126 common frames omitted
if the develop and product environment both have no password ,or both have password ,or develop environment havn't password but the product environment has it work.
But the source profile have password .spring-config property cann't clear it .
2018-05-02 13:50 GMT+08:00 Andy Wilkinson notifications@github.com:
Thanks for the report, @loftgame https://github.com/loftgame. Unfortunately, I don’t understand the description of the problem. Could you please provide a small sample with a failing test that shows things not working as you expect them to?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/13012#issuecomment-385871371, or mute the thread https://github.com/notifications/unsubscribe-auth/AGASI7Otc0NMhz1BeIGNmo77fk9VjbQ8ks5tuUkbgaJpZM4Tu2lw .
Comment From: wilkinsona
Thanks, but it’s still not clear what the problem is. Your second description is largely the same as the first, but with a stacktrace now too. As I asked above, can you please help me to understand by providing a complete sample that reproduces the problem.
Comment From: loftgame
- in you source envrionment use spring boot integration redis @EnableCaching and install the redis. set a passord.
2 config your application to use spring-config client
3 the anthor envrionment .install the reids use no password . edit the config . 2018-05-02 15:16:04.661 INFO 9772 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://120.78.67.51:9001 2018-05-02 15:16:06.670 INFO 9772 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=org-service, profiles=[online-test], label=null, version=76d0609b5ff940cf26719223fd23ab43fbccd212, state=null 2018-05-02 15:16:06.671 INFO 9772 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource [name='configService', propertySources=[MapPropertySource [name='configClient'], MapPropertySource [name=' https://gitlab.com/loftgame/jya-config.git/org-service-online-test.yml']]]
then the application start will load the property .
notice the reids and the profile both havn't use password.
then start the appliation .The error will happen Caused by: 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 redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) at org.springframework.data.redis.connection.jedis.JedisConnectionFactory. fetchJedisConnector(JedisConnectionFactory.java:194) ... 123 common frames omitted 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) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject( GenericObjectPool.java:435) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject( GenericObjectPool.java:363) at redis.clients.util.Pool.getResource(Pool.java:49) ... 126 common frames omitted
2018-05-02 14:51 GMT+08:00 Andy Wilkinson notifications@github.com:
Thanks, but it’s still not clear what the problem is. Your second description is largely the same as the first, but with a stacktrace now too. As I asked above, can you please help me to understand by providing a complete sample that reproduces the problem.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/13012#issuecomment-385880856, or mute the thread https://github.com/notifications/unsubscribe-auth/AGASI94lWR-p85xclFf4rmrLVusGKVeHks5tuVdagaJpZM4Tu2lw .
Comment From: wilkinsona
Thanks again, but that's not a complete sample. If I try to follow the steps above, I think it's unlikely that I'll end up with the same code and configuration that you have. Can you please provide a minimal project that contains all the code and configuration that necessary to reproduce the problem. You can either attach a zip file to this issue or create a repository on GitHub and share its URL.
Comment From: wilkinsona
Also, to make your comments easier to read, I'd recommend reading GitHub's advice on Markdown formatting and then updating them accordingly.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Comment From: majidshaikh16
Hi @wilkinsona Let me give a try explaining the issue(Because this issue even I am getting). I have a Redis server with the config set to NO Password (I have not set any password). - My application.yml for Redis looks like: redis: host: localhost port: 6379 - I try setting no password prop but I get ERROR [io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.]
Comment From: wilkinsona
Thanks, @majidshaikh16. That looks like a different problem as the problem originally reported in this issue was using Jedis and you appear to be using Lettuce. I'm not sure if your problem is a Lettuce issue, a Spring Boot issue, or a configuration problem. If you open a new issue with a small sample that reproduces the problem, we can investigate.
Comment From: majidshaikh16
Thanks, @wilkinsona for such a prompt response. I managed to fix the issue with Lettuce by updating Spring Boot Version from 2.2.1 RELEASE to 2.2.6 RELEASE and that has fixed my problem.
Cheers!