Spring Cloud Services for VMware Tanzu (SCS) packages the server-side
components of Spring Cloud Config and Spring Cloud Netflix Eureka, making them available as services in the VMware Tanzu Application Service for VMs Marketplace. This article demonstrates how to troubleshoot issues in using service registry (eureka) instance.
If your apps has any problems with service registry, please try the following troubleshooting steps.
1. Check the producer and consumer application status as well as logs. Look to see if the apps are hitting any problems or logging any error messages.
2. Check the service registry dashboard if producer apps are registered correctly, the URL is https://service-registry-<INSTANCE_GUID>.<DOMAIN>/dashboard, it can be found with `cf service
` command. For example:
$ cf service service-registry-instance | grep dashboard dashboard: https://service-registry-<GUID>.<DOMAIN>/dashboard
3. Check service-registry app status and logs, the service registry instance backend app is deployed under `p-spring-cloud-services
` org, `INSTANCE_GUID
` space.
$ cf t -o p-spring-cloud-services -s <INTANCE_GUID> && cf logs service-registry
In instance logs, a successful registration from producer is a POST
request with response 204
, it should be like,
2020-04-10T18:56:27.14+0200 [RTR/2] OUT service-registry-<GUID>.<DOMAIN> - [2020-04-10T16:56:27.104083176Z] "POST /eureka/apps/PRODUCER-DEMO HTTP/1.1" 204 1308 0 "-" "Java-EurekaClient/v1.9.17" "10.193.71.250:39536" "10.193.71.42:61043" x_forwarded_for:"10.193.71.40, 10.193.71.250" x_forwarded_proto:"https" vcap_request_id:"c276150a-0a6b-4325-6c82-d2e0848201ad" response_time:0.037486 gorouter_time:0.000160 app_id:"856b0fb5-c6f8-41a4-b1b2-5ea20b497b8f" app_index:"0" x_b3_traceid:"a257542bcd3c5501" x_b3_spanid:"a257542bcd3c5501" x_b3_parentspanid:"-" b3:"a257542bcd3c5501-a257542bcd3c5501"
After a successful POST
, the producer app keeps resending heartbeats (PUT
request) at 30 second intervals by default.
2020-04-10T18:56:57.14+0200 [RTR/2] OUT service-registry-<GUID>.<DOMAIN> - [2020-04-10T16:56:57.142500315Z] "PUT /eureka/apps/PRODUCER-DEMO/producer-demo.<DOMAIN>:41ea224b-9cff-42a8-6f0c-a615?status=UP&lastDirtyTimestamp=1586537787052 HTTP/1.1" 200 0 0 "-" "Java-EurekaClient/v1.9.17" "10.193.71.250:40848" "10.193.71.42:61043" x_forwarded_for:"10.193.71.40, 10.193.71.250" x_forwarded_proto:"https" vcap_request_id:"e2626775-3851-4c2c-7ac5-d0628069d93c" response_time:0.004333 gorouter_time:0.000297 app_id:"856b0fb5-c6f8-41a4-b1b2-5ea20b497b8f" app_index:"0" x_b3_traceid:"24042179bd242aeb" x_b3_spanid:"24042179bd242aeb" x_b3_parentspanid:"-" b3:"24042179bd242aeb-24042179bd242aeb"
Consumer apps keeps fetching the registry information from service registry (eureka) with GET
request at default 30s interval and store results in its local cache.
2020-04-10T19:07:32.36+0200 [RTR/1] OUT service-registry-<GUID>.<DOMAIN> - [2020-04-10T17:07:32.360151890Z] "GET /eureka/apps/delta HTTP/1.1" 200 0 85 "-" "Java-EurekaClient/v1.9.17" "10.193.71.250:33392" "10.193.71.42:61043" x_forwarded_for:"10.193.71.84, 10.193.71.250" x_forwarded_proto:"https" vcap_request_id:"fedd20c1-3aed-41fa-662b-bf1cb2adb4e6" response_time:0.004133 gorouter_time:0.000537 app_id:"856b0fb5-c6f8-41a4-b1b2-5ea20b497b8f" app_index:"0" x_b3_traceid:"fc98686749954a43" x_b3_spanid:"fc98686749954a43" x_b3_parentspanid:"-" b3:"fc98686749954a43-fc98686749954a43"
If you need help from VMware support, please collect above both apps and service registry logs and submit a support request.