Problems with the Eureka server

I have a local eureka server and one client

Eureka:

server: port: 1111 eureka: instance: prefer-ip-address: true client: registerWithEureka: false fetchRegistry: false serviceUrl: defaultZone: http://127.0.0.1:1111/eureka/ server: waitTimeInMsWhenSyncEmpty: 0 

Customer:

 eureka: instance: prefer-ip-address: true client: serviceUrl: defaultZone: http://127.0.0.1:1111/eureka/ 

I have 2 problems:

1) Eureka server throws a log:

NullPointerException: at com.netflix.eureka.resources.StatusResource.isReplicaAvailable

2) The client connects to Eureka, but after a while I see the following in his log:

RedirectingEurekaHttpClient: Request execution error javax.ws.rs.WebApplicationException: null on com.netflix.discovery.provider.DiscoveryJerseyProvider.readFrom (DiscoveryJerseyProvider.java:110)

RetryableEurekaHttpClient: Request failed DiscoveryClient: DiscoveryClient_MW / 192.168.0.100: client: 8080 - failed to send heartbeat!

com.netflix.discovery.shared.transport.TransportException: cannot complete the request on any known server

In the Eureka magazine, I see:

InstanceRegistry: DS: Registry: lease does not exist, resource registration: CLIENT - 192.168.0.100:client:8080 InstanceResource: not found (update): CLIENT - 192.168.0.100:client:8080

In the Eureka web console, the client has the status UP, but there is also a big inscription:

UPDATES - LESS THAN THRESHOLD. SAFETY MODE is OFF. THIS MAY NOT PROTECT INSTANCE EMERGENCY IN CASE OF NETWORK / OTHER PROBLEM

Although the connection works, and I can get a link to my client through Eureka.

Could you explain what this means and how I can get rid of it?

+5
source share
1 answer
 serviceUrl: defaultZone: http://127.0.0.1:1111/eureka/ 

in the configuration of the YML client, you must add a space before "defaultZone" as follows:

 serviceUrl: defaultZone: http://127.0.0.1:1111/eureka/ 

else defaultZone is the same level as serviceUrl. thanks

+4
source

All Articles