Dubbo中消费端报错Caused by: java.lang.IllegalStateException: Failed to check the status of th

本文介绍了在使用Dubbo时遇到的消费端报错问题,错误信息涉及到`java.lang.IllegalStateException`。通过关闭防火墙和调整注解版本以匹配服务端,成功解决了该问题。
摘要由CSDN通过智能技术生成

消费端代码:

@EnableAutoConfiguration
public class DubboConsumerBootstrap {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Reference()
    private DemoService demoService;

    public static void main(String[] args) {
        SpringApplication.run(DubboConsumerBootstrap.class).close();
    }

    @Bean
    public ApplicationRunner runner() {
        return args -> logger.info(demoService.sayHello("mercyblitz"));
    }
}

报错:


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dubboConsumerBootstrap': Injection of @org.apache.dubbo.config.annotation.Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.dubbo.example.DemoService. No provider available for the service com.dubbo.example.DemoService from the url zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=consumer&dubbo=2.0.2&interface=com.dubbo.example.DemoService&lazy=false&methods=sayHello&pid=18132&qos-enable=false&register.ip=192.168.93.1&release=2.7.2&side=consumer&sticky=false&timestamp=1562853955673 to the consumer 192.168.93.1 use dubbo version 2.7.2
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(Annotatio
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值