spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.88k stars 2.44k forks source link

Eureka instance returning as Unknown #4138

Closed Chay81 closed 1 year ago

Chay81 commented 2 years ago

Hi,

I'm getting an UNKNOWN instance in my eureka registry for one particular service. i have given all the necceary configuration but still return as unknown in the console and the registry.

below is information needed. Please help me where i'm going wrong

Console Trace:

"C:\Program Files\Java\jdk-17.0.4\bin\java.exe" -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\lib\idea_rt.jar=56400:C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\Chavi\Documents\workspace-spring-tool-suite-4-4.16.0.RELEASE\New SpringBoot Microservices Project\microservices-new\product-service\target\classes;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-starter-data-mongodb\2.6.13\spring-boot-starter-data-mongodb-2.6.13.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-starter\2.6.13\spring-boot-starter-2.6.13.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot\2.6.13\spring-boot-2.6.13.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.6.13\spring-boot-autoconfigure-2.6.13.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.6.13\spring-boot-starter-logging-2.6.13.jar;C:\Users\Chavi\.m2\repository\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;C:\Users\Chavi\.m2\repository\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;C:\Users\Chavi\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;C:\Users\Chavi\.m2\repository\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;C:\Users\Chavi\.m2\repository\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;C:\Users\Chavi\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\Chavi\.m2\repository\org\yaml\snakeyaml\1.29\snakeyaml-1.29.jar;C:\Users\Chavi\.m2\repository\org\mongodb\mongodb-driver-sync\4.4.2\mongodb-driver-sync-4.4.2.jar;C:\Users\Chavi\.m2\repository\org\mongodb\bson\4.4.2\bson-4.4.2.jar;C:\Users\Chavi\.m2\repository\org\mongodb\mongodb-driver-core\4.4.2\mongodb-driver-core-4.4.2.jar;C:\Users\Chavi\.m2\repository\org\springframework\data\spring-data-mongodb\3.3.9\spring-data-mongodb-3.3.9.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-tx\5.3.23\spring-tx-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-context\5.3.23\spring-context-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-beans\5.3.23\spring-beans-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-expression\5.3.23\spring-expression-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\data\spring-data-commons\2.6.9\spring-data-commons-2.6.9.jar;C:\Users\Chavi\.m2\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.6.13\spring-boot-starter-web-2.6.13.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.6.13\spring-boot-starter-json-2.6.13.jar;C:\Users\Chavi\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.13.4.2\jackson-databind-2.13.4.2.jar;C:\Users\Chavi\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.4\jackson-datatype-jdk8-2.13.4.jar;C:\Users\Chavi\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.4\jackson-datatype-jsr310-2.13.4.jar;C:\Users\Chavi\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.4\jackson-module-parameter-names-2.13.4.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.6.13\spring-boot-starter-tomcat-2.6.13.jar;C:\Users\Chavi\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.68\tomcat-embed-core-9.0.68.jar;C:\Users\Chavi\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.68\tomcat-embed-el-9.0.68.jar;C:\Users\Chavi\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.68\tomcat-embed-websocket-9.0.68.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-web\5.3.23\spring-web-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-webmvc\5.3.23\spring-webmvc-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-aop\5.3.23\spring-aop-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\projectlombok\lombok\1.18.24\lombok-1.18.24.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-core\5.3.23\spring-core-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-jcl\5.3.23\spring-jcl-5.3.23.jar;C:\Users\Chavi\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-eureka-client\3.1.4\spring-cloud-starter-netflix-eureka-client-3.1.4.jar;C:\Users\Chavi\.m2\repository\org\springframework\cloud\spring-cloud-starter\3.1.5\spring-cloud-starter-3.1.5.jar;C:\Users\Chavi\.m2\repository\org\springframework\cloud\spring-cloud-context\3.1.5\spring-cloud-context-3.1.5.jar;C:\Users\Chavi\.m2\repository\org\springframework\security\spring-security-crypto\5.6.8\spring-security-crypto-5.6.8.jar;C:\Users\Chavi\.m2\repository\org\springframework\cloud\spring-cloud-commons\3.1.5\spring-cloud-commons-3.1.5.jar;C:\Users\Chavi\.m2\repository\org\springframework\security\spring-security-rsa\1.0.11.RELEASE\spring-security-rsa-1.0.11.RELEASE.jar;C:\Users\Chavi\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.69\bcpkix-jdk15on-1.69.jar;C:\Users\Chavi\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.69\bcprov-jdk15on-1.69.jar;C:\Users\Chavi\.m2\repository\org\bouncycastle\bcutil-jdk15on\1.69\bcutil-jdk15on-1.69.jar;C:\Users\Chavi\.m2\repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\3.1.4\spring-cloud-netflix-eureka-client-3.1.4.jar;C:\Users\Chavi\.m2\repository\com\netflix\eureka\eureka-client\1.10.17\eureka-client-1.10.17.jar;C:\Users\Chavi\.m2\repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;C:\Users\Chavi\.m2\repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;C:\Users\Chavi\.m2\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;C:\Users\Chavi\.m2\repository\joda-time\joda-time\2.3\joda-time-2.3.jar;C:\Users\Chavi\.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;C:\Users\Chavi\.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\Chavi\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\Chavi\.m2\repository\com\google\code\gson\gson\2.8.9\gson-2.8.9.jar;C:\Users\Chavi\.m2\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;C:\Users\Chavi\.m2\repository\com\thoughtworks\xstream\xstream\1.4.18\xstream-1.4.18.jar;C:\Users\Chavi\.m2\repository\io\github\x-stream\mxparser\1.2.2\mxparser-1.2.2.jar;C:\Users\Chavi\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\Chavi\.m2\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;C:\Users\Chavi\.m2\repository\com\netflix\servo\servo-core\0.12.21\servo-core-0.12.21.jar;C:\Users\Chavi\.m2\repository\com\google\guava\guava\19.0\guava-19.0.jar;C:\Users\Chavi\.m2\repository\org\apache\httpcomponents\httpclient\4.5.13\httpclient-4.5.13.jar;C:\Users\Chavi\.m2\repository\org\apache\httpcomponents\httpcore\4.4.15\httpcore-4.4.15.jar;C:\Users\Chavi\.m2\repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;C:\Users\Chavi\.m2\repository\commons-configuration\commons-configuration\1.10\commons-configuration-1.10.jar;C:\Users\Chavi\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\Chavi\.m2\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;C:\Users\Chavi\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\Chavi\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.4\jackson-annotations-2.13.4.jar;C:\Users\Chavi\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.13.4\jackson-core-2.13.4.jar;C:\Users\Chavi\.m2\repository\org\codehaus\jettison\jettison\1.4.0\jettison-1.4.0.jar;C:\Users\Chavi\.m2\repository\com\netflix\eureka\eureka-core\1.10.17\eureka-core-1.10.17.jar;C:\Users\Chavi\.m2\repository\com\fasterxml\woodstox\woodstox-core\6.2.1\woodstox-core-6.2.1.jar;C:\Users\Chavi\.m2\repository\org\codehaus\woodstox\stax2-api\4.2.1\stax2-api-4.2.1.jar;C:\Users\Chavi\.m2\repository\org\springframework\cloud\spring-cloud-starter-loadbalancer\3.1.5\spring-cloud-starter-loadbalancer-3.1.5.jar;C:\Users\Chavi\.m2\repository\org\springframework\cloud\spring-cloud-loadbalancer\3.1.5\spring-cloud-loadbalancer-3.1.5.jar;C:\Users\Chavi\.m2\repository\io\projectreactor\reactor-core\3.4.24\reactor-core-3.4.24.jar;C:\Users\Chavi\.m2\repository\org\reactivestreams\reactive-streams\1.0.4\reactive-streams-1.0.4.jar;C:\Users\Chavi\.m2\repository\io\projectreactor\addons\reactor-extra\3.4.8\reactor-extra-3.4.8.jar;C:\Users\Chavi\.m2\repository\org\springframework\boot\spring-boot-starter-cache\2.6.13\spring-boot-starter-cache-2.6.13.jar;C:\Users\Chavi\.m2\repository\org\springframework\spring-context-support\5.3.23\spring-context-support-5.3.23.jar;C:\Users\Chavi\.m2\repository\com\stoyanr\evictor\1.0.0\evictor-1.0.0.jar" com.chay.product.service.ProductServiceApplication

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::               (v2.6.13)

2022-11-19 18:36:45.228  INFO 18628 --- [           main] c.c.p.service.ProductServiceApplication  : Starting ProductServiceApplication using Java 17.0.4 on ChavisY with PID 18628 (C:\Users\Chavi\Documents\workspace-spring-tool-suite-4-4.16.0.RELEASE\New SpringBoot Microservices Project\microservices-new\product-service\target\classes started by Chavi in C:\Users\Chavi\Documents\workspace-spring-tool-suite-4-4.16.0.RELEASE\New SpringBoot Microservices Project\microservices-new)
2022-11-19 18:36:45.230  INFO 18628 --- [           main] c.c.p.service.ProductServiceApplication  : No active profile set, falling back to 1 default profile: "default"
2022-11-19 18:36:45.649  INFO 18628 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2022-11-19 18:36:45.751  INFO 18628 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 99 ms. Found 1 MongoDB repository interfaces.
2022-11-19 18:36:45.877  INFO 18628 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=64c57702-1cd7-345b-b718-2b079a7a82b5
2022-11-19 18:36:46.090  INFO 18628 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-11-19 18:36:46.096  INFO 18628 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-11-19 18:36:46.096  INFO 18628 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.68]
2022-11-19 18:36:46.189  INFO 18628 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-11-19 18:36:46.190  INFO 18628 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 929 ms
2022-11-19 18:36:46.291  INFO 18628 --- [           main] org.mongodb.driver.cluster               : Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
2022-11-19 18:36:46.339  INFO 18628 --- [localhost:27017] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:2, serverValue:35}] to localhost:27017
2022-11-19 18:36:46.339  INFO 18628 --- [localhost:27017] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:1, serverValue:36}] to localhost:27017
2022-11-19 18:36:46.340  INFO 18628 --- [localhost:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=13, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=16265500}
2022-11-19 18:36:46.377  WARN 18628 --- [           main] o.s.data.convert.CustomConversions       : Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type; You might want to check your annotation setup at the converter implementation
2022-11-19 18:36:46.454  WARN 18628 --- [           main] o.s.data.convert.CustomConversions       : Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type; You might want to check your annotation setup at the converter implementation
2022-11-19 18:36:46.849  INFO 18628 --- [           main] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate.
2022-11-19 18:36:46.985  WARN 18628 --- [           main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2022-11-19 18:36:47.023  INFO 18628 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2022-11-19 18:36:47.047  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2022-11-19 18:36:47.051  INFO 18628 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2022-11-19 18:36:47.068  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2022-11-19 18:36:47.068  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2022-11-19 18:36:47.068  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2022-11-19 18:36:47.068  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2022-11-19 18:36:47.068  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2022-11-19 18:36:47.068  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2022-11-19 18:36:47.068  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2022-11-19 18:36:47.394  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2022-11-19 18:36:47.395  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2022-11-19 18:36:47.397  INFO 18628 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2022-11-19 18:36:47.400  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1668863207399 with initial instances count: 0
2022-11-19 18:36:47.401  INFO 18628 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application UNKNOWN with eureka with status UP
2022-11-19 18:36:47.401  INFO 18628 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1668863207401, current=UP, previous=STARTING]
2022-11-19 18:36:47.402  INFO 18628 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/host.docker.internal: registering service...
2022-11-19 18:36:47.418  INFO 18628 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2022-11-19 18:36:47.419  INFO 18628 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8080
2022-11-19 18:36:47.469  INFO 18628 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/host.docker.internal - registration status: 204
2022-11-19 18:36:47.517  INFO 18628 --- [           main] c.c.p.service.ProductServiceApplication  : Started ProductServiceApplication in 2.686 seconds (JVM running for 3.197)
2022-11-19 18:37:17.401  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2022-11-19 18:37:17.401  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2022-11-19 18:37:17.401  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2022-11-19 18:37:17.401  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Application is null : false
2022-11-19 18:37:17.401  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2022-11-19 18:37:17.401  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Application version is -1: false
2022-11-19 18:37:17.401  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2022-11-19 18:37:17.418  INFO 18628 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : The response status is 200

Controller Class

image

application.properties

image

pom.xml

image
spencergibb commented 1 year ago

I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference.

If you'd like us to spend some time investigating, please take the time to provide a complete, minimal, verifiable sample (something that we can unzip attached to this issue or git clone, build, and deploy) that reproduces the problem.

spring-cloud-issues commented 1 year ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues commented 1 year ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.