以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

posted @ 2020-05-07 14:33  高木子  阅读(316)  评论(0编辑  收藏  举报