Eureka Startup Error: Root name (‘timestamp‘) does not match expected type EurekaApplications
1. Eureka startup error
Recently, I was learning that Eureka started the client to report errors, and checked a bunch of fucking answers on the Internet
- Some people say that the spring security csrf authentication control is turned on, you have to add a configuration to cancel the csrf authentication
I see that my configuration does not introduce spring security package ah, where to open the login authentication, bullshit it - Some people say it is eureka url to add userName:password My eureka does not have a username password, should not be the problem here either
If you have introduced spring security and set login authentication to be added, the fundamental problem is not here
the error message is
Root name (‘timestamp’) does not match expected (‘applications’) for type EurekaApplications Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Root name (‘timestamp’) does not match expected (‘applications’) for type org.springframework.cloud.netflix.eureka.http.EurekaApplications at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 2] (through reference chain: org.springframework.cloud.netflix.eureka.http.EurekaApplications[“timestamp”])
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Root name ('timestamp') does not match expected ('applications') for type `org.springframework.cloud.netflix.eureka.http.EurekaApplications`
at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 2] (through reference chain: org.springframework.cloud.netflix.eureka.http.EurekaApplications["timestamp"])
2. Solutions
Eureka requires that the suffix end of your serviceurl must be Eureka
if you write something else, the above error will appear
what I write is http://localhost:${server.port}/eurekajzj is wrong
The server is consistent with the client http://localhost: ${server. Port}/Eureka will do
Otherwise, the above error will appear
3. Eureka server configuration
First, start the class eurekaserver
to see the configuration of the server
spring.application.name=eureka-server
server.port=8761
#eureka auto-preservation off
eureka.server.enable-self-preservation=false
eureka.instance.hostname=eureka-hostname-jzj
# Cannot call self
eureka.client.fetch-registry=false
#Does not register itself
eureka.client.register-with-eureka=false
eureka.client.service-url.defaultZone = http://localhost:${server.port}/eurekajzj
4. Eureka client configuration
server.port=8088
#user service
spring.application.name=user-client
#eureka
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eurekajzj
5. Problems
The problem is the eurekajzj suffix
The serviceUrl address of my Eureka Server configuration
eureka.client.service-url.defaultZone = http://localhost:${server.port}/eurekajzj
My client’s configured eureka address
eureka.client.serviceUrl.defaultZone = http://localhost:8761/eurekajzj
The suffix ending is not eureka
After modification, all Eureka services and clients are working fine
Read More:
- Springcloud configuration center client 3355 startup Error: error on get request for“ http://localhost:8761/eureka/apps/ “: Connection
- Libtorch Error: Expected object of type Variable but found type CUDALongType for argument #2 ‘index’
- JSON parse error: raw timestamp (1595952000000) not allowed for
- [Solved] Eureka registry service starts error: Request execution error. Endpoint = defaultendpoint
- [Solved] Eureka related services Start Error: cannot execute request on any known server
- No match for ‘operator =’ both ends of the equal sign do not match
- [How to Solve] Content with element type ‘mapper’ must match
- C# Error: Import “google/protobuf/timestamp.proto“ was not found or had errors. [How to Solve]
- Eureka unit test error creating bean with name ‘Eureka autoservice registration’: Singleton bean
- [Solved] swiper Error: The requested module ‘react’ is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export
- IDEA appears Module ** must not contain source root **. The root already belongs to module ** This kind of error solution
- TensorFlow issue: Expected int32, got list containing Tensors of type ‘_Message’ instead.
- error: src refspec master does not match any [How to Solve]
- [Solved] Springboot Startup Error: Consider defining a bean of type ‘XXX’ in your configuration.
- error: expected ‘;‘ at end of member declaration and expected ‘)‘ before ‘&‘ toke Errors
- error: src refspec master does not match any [How to Solve]
- [Solved] error LNK2038: Detected mismatch of “RuntimeLibrary”: The value “MDd_DynamicDebug” does not match the value “MTd_StaticDebug”
- [Solved] SpringBoot Error: HttpMediaTypeNotSupportedException: Content type ‘application/json‘ not supported
- [Solved] MindSpore Error: ValueError: Minimum inputs size 0 does not match…
- [Solved] Error: SRC refspec master doors not match any