This relates to some undesirable behaviour originally reported in #2756.
A simple Eureka client application built with the Jersey client modules excluded from its org.springframework.cloud:spring-cloud-dependencies:Finchley.RC1 throws an error every time it attempts to refresh its local cache of registry information. The root cause of the problem appears to be a JSON parsing error relating to an unrecognised field called "overriddenStatus" in the returned instance information. A small snippet of the stack trace is shown below:
2018-05-17 11:55:49.605 WARN 5170 --- [freshExecutor-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: Error while extracting response for type [class org.springframework.cloud.netflix.eureka.http.EurekaApplications] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
at [Source: (PushbackInputStream); line: 1, column: 1083] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])
2018-05-17 11:55:49.605 ERROR 5170 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_A-BOOTIFUL-CLIENT/192.168.1.172:a-bootiful-client - was unable to refresh its cache! status = Cannot execute request on any known server
To demonstrate the problem in my fork of the service registration and discovery guide repo I've just excluded the Jersey client modules from the complete client dependencies under the complete folder as follows:
. . .
dependencies {
compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-client') {
exclude group: "com.sun.jersey", module: "jersey-client"
exclude group: "com.sun.jersey", module: "jersey-core"
exclude group: "com.sun.jersey.contribs", module: "jersey-apache-client4"
}
compile('org.springframework.boot:spring-boot-starter-web')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server')
}
. . .
To see this problem occurring please follow these steps:
complete directory./gradlew clean build./gradlew :eureka-service:bootRun./gradlew :eureka-client:bootRun After approximately 30 seconds the client application will attempt to fetch registry information and the error should occur for the first time. It will repeat every 30 seconds thereafter as successive cache fetch requests are made.
This is a duplicate (on mobile will find later) and should be fixed on snapshots if I'm not mistaken.
I think #2756 is the one you are thinking of @spencergibb.
Just tried updating my local copy of the guide code to use Finchley.BUILD-SNAPSHOT and the problem is still there.
I actually don't see the problem running in the ide
sorry, I do see, just not on registration.
@georgeharley I have pinged the Netflix guys as their fix doesnt appear to fix our issue
Yeah, basically only a fix if we use their encoder, rest template doesn't
Yeah I didnt actually look at the fix until just now :(
So either they fix the case, or we customize the object mapper to adjust it