dubbo实战---No provider available for the service
来源:互联网 发布:ise12.3软件下载 编辑:程序博客网 时间:2024/06/14 08:30
问题:
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&timestamp=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实战---No provider available for the service
- Dubbo:No provider available for the service
- Dubbo错误No provider available for the service
- 有时候出现No provider available for the service dubbo错误
- Dubbo中No provider available for the service异常
- Dubbo错误: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 client 启动报错:No provider available for the service use dubbo version 2.5.3
- dubbo启动消费者报错:No provider available for the service
- dubbo+zookeeper与提供者、消费者之间端口通信问题(No provider available for the service)
- dubbo没有服务提供者错误 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异常:Failed to check the status of the service . No provider available for the service 解决
- No provider available from registry 127.0.0.1:2181 for service com.focussend.email.service.EdmTaskS
- 关于Failed to check the status of the service com.taotao.service.ItemService. No provider available fo
- 【Angular】Angular+Ionic报错:No provider for *Service!
- AES工具类
- python笔记--*args 和 **kwargs
- 构造包含一个元素的元组规则解析
- macOS装回java8
- js常用方法总结
- dubbo实战---No provider available for the service
- CXF实现wsdl文件转换为javaBean
- CSDN中搜索用户
- Java Excel导出
- vs2008设置选中 高亮
- Ubuntu 16.04 安装chrome+postman
- 在阿里云海外windows主机上开启virtualPN
- 第三次作业
- leetcode 485. Max Consecutive Ones