# Eureka Common errors

Eureka common errors

THE SELF PRESERVATION MODE IS TURNED OFF. THIS MAY NOT PROTECT INSTANCE EXPIRY IN CASE OF NETWORK/OTHER PROBLEMS. (Self-protection mode is turned off. This may not protect the instance in case of expiration, network/other problems.)
#    端口号
server:
  port: 8001
spring:
  application:
    name: eurekaserver
eureka:
  instance:
    hostname: localhost # Eureka访问地址
  client:
    register-with-eureka: false # 禁止自己注册自己
    fetch-registry: false #服务发现,是否从Eureka中获取注册信息
    #Eureka客户端与Eureka服务端的交互地址,高可用状态配置对方的地址,单机状态配置自己(如果不配置则默认本机8761端口)
    service-url:
      defaultZone: http://${
    
    eureka.instance.hostname}:${
    
    server.port}/eureka/
  server:
    enable-self-preservation: false # 关闭自我保护模式
    eviction‐interval‐timer‐in‐ms: 60000 #服务注册表清理间隔(单位毫秒,默认是60*1000)

Eureka Server has a self-protection mode. When microservices no longer report status to Eureka Server, Eureka Server deletes this service from the service list. If there is a network abnormality (microservices are normal), Eureka server enters the self-protection mode. No longer delete microservices from the service list. It is recommended to turn off the self-protection mode during the development phase.


Guess you like

Origin blog.csdn.net/qq_37248504/article/details/114903592