dubbo引起的spring UnsatisfiedDependencyException

 

开发环境测试没有问题,上测试环境报错,而且只有一个service报错

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'corCrmBankFlowAction': Unsatisfied dependency expressed through field 'corCrmRefundFlowService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'corCrmRefundFlowService': FactoryBean threw exception on object creation; nested exception is com.alibaba.dubbo.rpc.RpcException: Fail to create remoting client for service(dubbo://127.0.0.1:20880/com.tone.service.CorCrmRefundFlowService?application=consumer-userService&codec=dubbo&default.timeout=30000&dubbo=2.5.3&heartbeat=60000&interface=com.tone.service.CorCrmRefundFlowService&methods=findBySqlId,removeById,save,getTotalCount,saveList,update,findPage,updates,findAll,updateBySqlId,removeByIds,saves,findPageBySqlId,findList,findById,removeByObject&pid=30005&side=consumer&timestamp=1511858034278): client(url: dubbo://127.0.0.1:20880/com.tone.service.CorCrmRefundFlowService?application=consumer-userService&codec=dubbo&default.timeout=30000&dubbo=2.5.3&heartbeat=60000&interface=com.tone.service.CorCrmRefundFlowService&methods=findBySqlId,removeById,save,getTotalCount,saveList,update,findPage,updates,findAll,updateBySqlId,removeByIds,saves,findPageBySqlId,findList,findById,removeByObject&pid=30005&side=consumer&timestamp=1511858034278) failed to connect to server /127.0.0.1:20880, error message is:Connection refused
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'corCrmRefundFlowService': FactoryBean threw exception on object creation; nested exception is com.alibaba.dubbo.rpc.RpcException: Fail to create remoting client for service(dubbo://127.0.0.1:20880/com.tone.service.CorCrmRefundFlowService?application=consumer-userService&codec=dubbo&default.timeout=30000&dubbo=2.5.3&heartbeat=60000&interface=com.tone.service.CorCrmRefundFlowService&methods=findBySqlId,removeById,save,getTotalCount,saveList,update,findPage,updates,findAll,updateBySqlId,removeByIds,saves,findPageBySqlId,findList,findById,removeByObject&pid=30005&side=consumer&timestamp=1511858034278): client(url: dubbo://127.0.0.1:20880/com.tone.service.CorCrmRefundFlowService?application=consumer-userService&codec=dubbo&default.timeout=30000&dubbo=2.5.3&heartbeat=60000&interface=com.tone.service.CorCrmRefundFlowService&methods=findBySqlId,removeById,save,getTotalCount,saveList,update,findPage,updates,findAll,updateBySqlId,removeByIds,saves,findPageBySqlId,findList,findById,removeByObject&pid=30005&side=consumer&timestamp=1511858034278) failed to connect to server /127.0.0.1:20880, error message is:Connection refused
 

本以为是spring的配置问题,事实证明还是dubbo没配置好。

在开发环境中为了开发方便,用的本地直连,设置的local127.0.0.1访问。在上测试环境的时候改成了ZooKeeper的连接,因为用的是全局替换,这个service漏掉了,xml中依然是url="dubbo://127.0.0.1:20880"。导致报错。

转载于:https://my.oschina.net/muzzylion/blog/1581206

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值