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
Client:
eureka:
instance:
prefer-ip-address: true
client:
serviceUrl:
defaultZone: http://127.0.0.1:1111/eureka/
I have 2 problems:
1) Eureka server throws in log:
NullPointerException: at com.netflix.eureka.resources.StatusResource.isReplicaAvailable
2) The client connecting with Eureka, but after some time I see in his log next:
RedirectingEurekaHttpClient : Request execution error javax.ws.rs.WebApplicationException: null at com.netflix.discovery.provider.DiscoveryJerseyProvider.readFrom(DiscoveryJerseyProvider.java:110)
RetryableEurekaHttpClient : Request execution failure DiscoveryClient : DiscoveryClient_MW/192.168.0.100:client:8080 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
In log Eureka I see:
InstanceRegistry : DS: Registry: lease doesn't exist, registering resource: CLIENT - 192.168.0.100:client:8080 InstanceResource : Not Found (Renew): CLIENT - 192.168.0.100:client:8080
In Eureka web console the client has a UP status, but also there is a big inscription:
RENEWALS ARE LESSER THAN THE THRESHOLD. THE SELF PRESERVATION MODE IS TURNED OFF.THIS MAY NOT PROTECT INSTANCE EXPIRY IN CASE OF NETWORK/OTHER PROBLEM
Although connection is working and I can get link to my client throught Eureka.
Could you explain what it means and how I can get rid from that?
serviceUrl:
defaultZone: http://127.0.0.1:1111/eureka/
in client setting YML, you should add space before "defaultZone" like this:
serviceUrl:
defaultZone: http://127.0.0.1:1111/eureka/
else defaultZone is same level with serviceUrl. thanks