当前位置:   article > 正文

Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR invalid password

caused by: redis.clients.jedis.exceptions.jedisdataexception: err invalid pa

注册中心地址:redis://192.168.21.19:6379?auth=root:123123

2018-01-08 19:22:31,485 main -  [DUBBO] Failed to register dubbo://192.168.2.196:30012/com.lanmei.service.UserService?anyhost=true&application=wbq_provider&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.lanmei.service.UserService&loadbalance=roundrobin&methods=getUserId,dkqbReg,memberList,loanMobileExists,userMobileExists,setNickName,logout,pushSet,iforgot,reg,qrcode,login,setInfo&owner=wbq&pid=13640&retries=0&revision=1.0.1-SNAPSHOT&side=provider&timeout=30000×tamp=1515410551210 to registry 192.168.21.19:6379, cause: Failed to register service to redis registry. registry: 192.168.21.19:6379, service: dubbo://192.168.2.196:30012/com.lanmei.service.UserService?anyhost=true&application=wbq_provider&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.lanmei.service.UserService&loadbalance=roundrobin&methods=getUserId,dkqbReg,memberList,loanMobileExists,userMobileExists,setNickName,logout,pushSet,iforgot,reg,qrcode,login,setInfo&owner=wbq&pid=13640&retries=0&revision=1.0.1-SNAPSHOT&side=provider&timeout=30000×tamp=1515410551210, cause: Could not get a resource from the pool, dubbo version: 2.5.4-SNAPSHOT, current host: 127.0.0.1

java.lang.IllegalStateException: Failed to register dubbo://192.168.2.196:30012/com.lanmei.service.UserService?anyhost=true&application=wbq_provider&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.lanmei.service.UserService&loadbalance=roundrobin&methods=getUserId,dkqbReg,memberList,loanMobileExists,userMobileExists,setNickName,logout,pushSet,iforgot,reg,qrcode,login,setInfo&owner=wbq&pid=13640&retries=0&revision=1.0.1-SNAPSHOT&side=provider&timeout=30000&timestamp=1515410551210 to registry 192.168.21.19:6379, cause: Failed to register service to redis registry. registry: 192.168.21.19:6379, service: dubbo://192.168.2.196:30012/com.lanmei.service.UserService?anyhost=true&application=wbq_provider&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.lanmei.service.UserService&loadbalance=roundrobin&methods=getUserId,dkqbReg,memberList,loanMobileExists,userMobileExists,setNickName,logout,pushSet,iforgot,reg,qrcode,login,setInfo&owner=wbq&pid=13640&retries=0&revision=1.0.1-SNAPSHOT&side=provider&timeout=30000&timestamp=1515410551210, cause: Could not get a resource from the pool
at com.alibaba.dubbo.registry.support.FailbackRegistry.register(FailbackRegistry.java:143)
at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:111)
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53)
at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:488)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:284)
at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:245)
at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:144)
at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at com.alibaba.dubbo.container.spring.SpringContainer.start(SpringContainer.java:50)
at com.alibaba.dubbo.container.Main.main(Main.java:80)
at com.dubbo.service.ServiceStart.start(ServiceStart.java:23)
at com.dubbo.service.ServiceStart.main(ServiceStart.java:11)
Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to register service to redis registry. registry: 192.168.21.19:6379, service: dubbo://192.168.2.196:30012/com.lanmei.service.UserService?anyhost=true&application=wbq_provider&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.lanmei.service.UserService&loadbalance=roundrobin&methods=getUserId,dkqbReg,memberList,loanMobileExists,userMobileExists,setNickName,logout,pushSet,iforgot,reg,qrcode,login,setInfo&owner=wbq&pid=13640&retries=0&revision=1.0.1-SNAPSHOT&side=provider&timeout=30000&timestamp=1515410551210, cause: Could not get a resource from the pool
at com.alibaba.dubbo.registry.redis.RedisRegistry.doRegister(RedisRegistry.java:289)
at com.alibaba.dubbo.registry.support.FailbackRegistry.register(FailbackRegistry.java:130)
... 19 more
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:50)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99)
at com.alibaba.dubbo.registry.redis.RedisRegistry.doRegister(RedisRegistry.java:277)
... 20 more
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR invalid password
at redis.clients.jedis.Protocol.processError(Protocol.java:117)
at redis.clients.jedis.Protocol.process(Protocol.java:151)
at redis.clients.jedis.Protocol.read(Protocol.java:205)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:196)
at redis.clients.jedis.BinaryJedis.auth(BinaryJedis.java:2013)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:87)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:861)
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:48)
... 22 more
2018-01-08 19:22:31,488 DubboShutdownHook -  [DUBBO] Run shutdown hook now., dubbo version: 2.5.4-SNAPSHOT, current host: 127.0.0.1
2018-01-08 19:22:31,489 DubboShutdownHook -  [DUBBO] Close all registries [], dubbo version: 2.5.4-SNAPSHOT, current host: 127.0.0.1
2018-01-08 19:22:31,489 DubboShutdownHook -  [DUBBO] Close dubbo server: /192.168.2.196:30012, dubbo version: 2.5.4-SNAPSHOT, current host: 127.0.0.1
2018-01-08 19:22:31,490 DubboShutdownHook -  [DUBBO] Close NettyServer bind /0.0.0.0:30012, export /192.168.2.196:30012, dubbo version: 2.5.4-SNAPSHOT, current host: 127.0.0.1
2018-01-08 19:22:31,492 DubboShutdownHook -  [DUBBO] Unexport service: dubbo://192.168.2.196:30012/com.lanmei.service.UserService?anyhost=true&application=wbq_provider&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.lanmei.service.UserService&loadbalance=roundrobin&methods=getUserId,dkqbReg,memberList,loanMobileExists,userMobileExists,setNickName,logout,pushSet,iforgot,reg,qrcode,login,setInfo&owner=wbq&pid=13640&retries=0&revision=1.0.1-SNAPSHOT&side=provider&timeout=30000&timestamp=1515410551210, dubbo version: 2.5.4-SNAPSHOT, current host: 127.0.0.1

2018-01-08 19:22:31,492 DubboShutdownHook -  [DUBBO] Unexport service: injvm://127.0.0.1/com.lanmei.service.UserService?anyhost=true&application=wbq_provider&dubbo=2.5.4-SNAPSHOT&generic=false&interface=com.lanmei.service.UserService&loadbalance=roundrobin&methods=getUserId,dkqbReg,memberList,loanMobileExists,userMobileExists,setNickName,logout,pushSet,iforgot,reg,qrcode,login,setInfo&owner=wbq&pid=13640&retries=0&revision=1.0.1-SNAPSHOT&side=provider&timeout=30000×tamp=1515410551210, dubbo version: 2.5.4-SNAPSHOT, current host: 127.0.0.1


dubbo提供者注册redis导致ERR invalid password原因:

1.没有用户名的情况下,redis注册地址不对,修改为redis://192.168.21.19:6379?auth=123123即可


*dubbo进行redis注册时auth=后面跟上"用户名:认证密码",没有用户名时,auth=后面跟上"认证密码"即可。

*本文是在工作中遇到的问题,解决方式也因开发环境不同而不同。本文仅作为参考,不喜勿喷。


redis认证密码两种设置方式:

1.修改redis.conf中requirepass为123123

2.运行./redis-cli 通过config  set requirepass foobared设置

3.需重启

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/672634
推荐阅读
相关标签
  

闽ICP备14008679号