WEB/MSA[Cloud Native Java]

netflix - eureka - server 설정

PSAwesome 2020. 2. 2. 16:02
반응형

서버 설정할 때 필요하지만 할 때마다 새로 찾아보는 것들..

  • eureka.client:
    • register-with-eureka: false
    •  fetch-registry: false
      • 자기 자신은 제외 (이 설정을 하지 않으면 아래의 로그를 볼 수 있습니다.)
더보기

2020-02-02 15:43:11.310 WARN 22964 --- [tbeatExecutor-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: java.net.ConnectException: Connection refused: connect
2020-02-02 15:43:11.311 ERROR 22964 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-REGISTRY/host.docker.internal:service-registry - was unable to send heartbeat!

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

...

2020-02-02 15:43:11.310 ERROR 22964 --- [tbeatExecutor-0] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/}

com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect

  • eureka.server.enable-self-preservation: false
    • 생존 신호를 계속 보내지 않으면 목록에서 제거하도록 설정하는 것이 false
    • 자기 보호 방식을 false 한다는 의미와 같다.
  • service-url:
    • default-zone: http://${eureka.instance.hostname}:${server.port}/eureka

 

 

반응형