以zookeeper为注册中心搭建spring cloud环境bug

Posted 高木子

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了以zookeeper为注册中心搭建spring cloud环境bug相关的知识,希望对你有一定的参考价值。

错误描述: 服务间调用的时候 总是不通

feign.RetryableException: connect timed out executing POST http://common-service/supplywater/deviceManage/keyUnitData

原因、;

以zookeeper为注册中心时,配置文件需指定机器地址

spring:
  application:
    name: common-service
  cloud:
    zookeeper:
      connect-string: 121.196.91.0:2172
      discovery:
        enabled: true
        #最重要的就是下面这句 
        instance-host: 121.196.91.0

 https://blog.csdn.net/my_momo_csdn/article/details/82190560

以上是关于以zookeeper为注册中心搭建spring cloud环境bug的主要内容,如果未能解决你的问题,请参考以下文章

使用Spring Cloud搭建服务注册中心

zookeeper注册中心

搭建分布式架构 --ZooKeeper注册中心安装

dubbo环境搭建ZooKeeper注册中心

搭建JEESZ分布式架构7--Zookeeper注册中心安装

搭建JEESZ分布式架构7--Zookeeper注册中心安装