SpringCloud Read超时

时间:2018-06-05 12:43:04

标签: spring-cloud netflix-eureka netflix-ribbon

我想完成Spring云分布式网站的构建,但我无法完成Eureka客户端注册到Euerka Server。我有一个关于Spring云的问题。当我启动三个Eureka集群服务时,然后启动了一个eureka客户端。在其中一个Eureka服务器中引发读取超时异常。

以下是我的Eureka客户端的启动课程

@SpringBootApplication
@EnableEurekaClient     
public class DeptProvider8001_App {
    public static void main(String[] args) {
        SpringApplication.run(DeptProvider8001_App.class, args);
    }
}

这是我的Eureka Server的启动课程

@SpringBootApplication
@EnableEurekaServer     
public class EurekaServer7001_App {
    public static void main(String[] args) {
        SpringApplication.run(EurekaServer7001_App.class, args);
    }
}

这些是我的eureka Server application.xml

eureka:
  #server:
    #enable-self-preservation: false    
  instance:
     hostname: eureka7001.com      
  client:
    register-with-eureka: false   
    fetch-registry: false       
    service-url:
      defaultZone: 
http://eureka7002.com:7002/eureka/,http://eureka7003.com:7003/eureka/
spring:
  application:
   name: eureka-server

这些是我的eureka客户端application.xml

eureka:
  client:       
    service-url:
     defaultZone: 

 http://eureka7001.com:7001/eureka/,http://eureka7002.com:7002/eureka/,http://eureka7003.com:7003/eureka/
      instance:       
        instance-id: microservicecloud-dept8001
        prefer-ip-address: true  

错误记录

  

com.sun.jersey.api.client.ClientHandlerException:   java.net.SocketTimeoutException:读取超时

0 个答案:

没有答案