1、com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
或者com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
The reasons are as follows:
By default, the Eureka service registry will also try to register itself as a client, so we need to disable its client registration behavior.
The prohibition method is as follows: Add the following content to the application.properties configuration file
eureka.client.register-with-eureka=
false
eureka.client.fetch-registry=
false
as the picture shows:
Just restart