2

I want to complete the spring cloud distributed website construction, but I can not complete Eureka client registration to Euerka Server. I have a question about Spring cloud. When I started three Eureka cluster services, then started a eureka client. Throws the Read timeout exception in one of the Eureka servers.

Here is my Eureka Client's Startup class

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

Here is my Eureka Server's Startup class

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

These are my 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

These are my eureka Client 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  

Error Logs

com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out

g00glen00b
  • 41,995
  • 13
  • 95
  • 133

0 Answers0