dubbo实战---No provider available for the service
2017-12-11 20:53
666 查看
问题:
java.lang.IllegalStateException:Failed to check the status of the servicecom.alibaba.dubbo.demo.consumer.HelloService. No provider available for the service com.alibaba.dubbo.demo.consumer.HelloService
from the urlzookeeper://*.*.*.*:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=customer-center-consumer-app&check=false&dubbo=2.5.5&interface=com.alibaba.dubbo.demo.consumer.HelloService&methods=register,sayHello&pid=22130&revision=2.5.5&side=consumer×tamp=1507604148514to
the consumer 0.0.0.111 use dubbo version 2.5.5
No provider available for the service 遇到这个问题想到的解决方法是provider没有注册到注册中心上,导致consumer没有拿到服务.但是在dubbo-admin上看到了provider在提供者列表上显示着,只是感觉provider注册到注册中心的地址不对.
于是写了如下代码,发布成了一个服务.
发布以后返回的ip地址是0.0.0.111.得出provider注册到注册中心的ip地址是不对的.
原因:
dubbo服务发布的服务器的IP使用的是DHCP,而不是静态的,dubbo服务provider注册的地址为0.0.0.111,而consumer去找的地址为192.168.22.111,所以造成了consumer找不到provider的结果.
解决方法:
将服务器IP获取方式改为静态的即可.
在网上也找过很多的解决方法,但是没有一个是合适的,还是要对症下药.
java.lang.IllegalStateException:Failed to check the status of the servicecom.alibaba.dubbo.demo.consumer.HelloService. No provider available for the service com.alibaba.dubbo.demo.consumer.HelloService
from the urlzookeeper://*.*.*.*:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=customer-center-consumer-app&check=false&dubbo=2.5.5&interface=com.alibaba.dubbo.demo.consumer.HelloService&methods=register,sayHello&pid=22130&revision=2.5.5&side=consumer×tamp=1507604148514to
the consumer 0.0.0.111 use dubbo version 2.5.5
No provider available for the service 遇到这个问题想到的解决方法是provider没有注册到注册中心上,导致consumer没有拿到服务.但是在dubbo-admin上看到了provider在提供者列表上显示着,只是感觉provider注册到注册中心的地址不对.
于是写了如下代码,发布成了一个服务.
public static void main(String[] args) { InetAddress localAddress = NetUtils.getLocalAddress(); System.out.println(localAddress.getHostAddress()); }
发布以后返回的ip地址是0.0.0.111.得出provider注册到注册中心的ip地址是不对的.
原因:
dubbo服务发布的服务器的IP使用的是DHCP,而不是静态的,dubbo服务provider注册的地址为0.0.0.111,而consumer去找的地址为192.168.22.111,所以造成了consumer找不到provider的结果.
解决方法:
将服务器IP获取方式改为静态的即可.
在网上也找过很多的解决方法,但是没有一个是合适的,还是要对症下药.
相关文章推荐
- Dubbo: Failed to check the status of the service . No provider available for the service
- dubbo启动消费者报错:No provider available for the service
- dubbo异常:Failed to check the status of the service . No provider available for the service 解决
- Dubbo:No provider available for the service
- 【Dubbo】no provider available for the service错误解决方案
- Dubbo client 启动报错:No provider available for the service use dubbo version 2.5.3
- Dubbo错误No provider available for the service
- Dubbo学习笔记:No provider available for the service ...异常问题的解决
- 有时候出现No provider available for the service dubbo错误
- dubbo+zookeeper与提供者、消费者之间端口通信问题(No provider available for the service)
- Dubbo错误:No provider available for the service
- dubbo+zookeeper与提供者、消费者之间端口通信问题(No provider available for the service)
- Dubbo官方demo 消费者报错:No provider available for the service
- dubbo+zookeeper与提供者、消费者之间端口通信问题(No provider available for the service)
- dubbo异常:Failed to check the status of the service . No provider available for the service 解决
- Failed to check the status of the service. No provider available for the service【已解决】
- dubbo+zookeeper与提供者、消费者之间端口通信问题(No provider available for the service)
- No provider available from registry 127.0.0.1:2181 for service com.focussend.email.service.EdmTaskS
- The POM for XXX:jar:${com.ld.base.service.version} is missing, no dependency information available
- dubbo配置报错:The matching wildcard is strict, but no declaration can be found for element