dubbo中遇到的问题(一)

本文详细介绍了在使用Dubbo框架时遇到服务端启动后挂掉,导致客户端无法获取服务的情况,并提供了有效的解决方法。通过检查服务端状态和调整配置参数,可以确保服务端持续运行,从而解决客户端获取服务的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用过程中遇到如下问题,因服务端启动后挂掉,客户端无法获取,解决方法是服务端一直都要活着:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsCustomerService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.baturu.login.service.BsCustomerService. No provider available for the service com.baturu.login.service.BsCustomerService from the url zookeeper://192.168.0.253:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-login-service&check=false&connected=true&default.timeout=60000&dubbo=2.4.9&inside.invoker.count=1&inside.invokers=dubbo%3A%2F%2F192.168.0.12%3A20881%2Fcom.baturu.login.service.BsCustomerService%3Fanyhost%3Dtrue%26application%3Dlogin-service%26default.timeout%3D60000%26dubbo%3D2.4.9%26interface%3Dcom.baturu.login.service.BsCustomerService%26methods%3DverifyLogin%26pid%3D5540%26side%3Dprovider%26timestamp%3D1417242287804&interface=com.baturu.login.service.BsCustomerService&methods=verifyLogin&pid=6536&side=consumer&timestamp=1417248855633 to the consumer 192.168.0.12 use dubbo version 2.4.9

at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1468)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at com.baturu.test.main.ServiceRun.initSysBeansOfContext(ServiceRun.java:36)
at com.baturu.test.main.ServiceRun.main(ServiceRun.java:20)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.baturu.login.service.BsCustomerService. No provider available for the service com.baturu.login.service.BsCustomerService from the url zookeeper://192.168.0.253:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-login-service&check=false&connected=true&default.timeout=60000&dubbo=2.4.9&inside.invoker.count=1&inside.invokers=dubbo%3A%2F%2F192.168.0.12%3A20881%2Fcom.baturu.login.service.BsCustomerService%3Fanyhost%3Dtrue%26application%3Dlogin-service%26default.timeout%3D60000%26dubbo%3D2.4.9%26interface%3Dcom.baturu.login.service.BsCustomerService%26methods%3DverifyLogin%26pid%3D5540%26side%3Dprovider%26timestamp%3D1417242287804&interface=com.baturu.login.service.BsCustomerService&methods=verifyLogin&pid=6536&side=consumer&timestamp=1417248855633 to the consumer 192.168.0.12 use dubbo version 2.4.9
at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:422)
at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:303)
at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:138)
at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:65)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 7 more
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值