[Solved] Eureka registry service starts error: Request execution error. Endpoint = defaultendpoint

Eureka registry service starts with an error request execution error. Endpoint = defaultendpoint {serviceurl = ' http://127.0.0.1:8000/eureka/ }

 Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://127.0.0.1:8000/eureka/}, exception=java.net.ConnectException: Connection refused: connect stacktrace=com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect

There are two reasons for the above problems:

The defaultzone attribute in the configuration file does not recognize that when Eureka is started, it will pull the information of other services by default and set it to close to run normally
fetch registry: false

The application.yaml configuration file is as follows

server:
  port: 8000
  # server name
spring:
  application:
    name: eureka-server
# Eureka address information configuration
eureka:
  client:
    service-url:
      defaultZone: http://127.0.0.1:8000/eureka
    register-with-eureka: false # Whether to register your own information to EurekaServer, the default is true
     fetch-registry: false # Whether to pull information about other services, the default is true

Read More: