服務在Eureka上註冊成功能夠訪問每一個接口可是接口互相調用超時

服務註冊成功,接口之間調用超時,單獨訪問每一個接口能夠成功。有多是服務註冊在不一樣的ip段上,配置文件加以下配置java

eureka:
  client:
    service-url:
      defaultZone: http://localhost:10010/eureka/
  instance:
    preferIpAddress : true
    instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
    #也能夠直接寫死
    # instance-id: 127.0.0.1:8000


其中獲取ip,SpringCloud2.0版本對應的key值爲${spring.cloud.clent.ip-address},網上流傳大多爲${spring.cloud.clent.ipAddress}
相關文章
相關標籤/搜索