question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SBA doesn't display actuator endpoints for services (150+) discovered by Eureka registry

See original GitHub issue

Main issue: I have 150+ Spring Boot microservices registered to Eureka. When I run SBA with cloud discovery, all services appear and show Details pages, but just a few of them show the other tabs (ENV, JMX, Loggers, …)

Initial configuration: Spring Boot Starter 2.0.5, Spring Boot Admin 2.0.3 (also compiled from sources based on 2.0.x branch). SBA discovery - Eureka

I have some investigations and want to share it. It can be useful or at least helps to determine what’s wrong with my assumptions:

  1. All instance endpoints register in Instance class : Instance apply(InstanceEvent event, boolean isNewEvent) These events are InstanceRegistrationUpdatedEvent, InstanceEndpointsDetectedEvent and so on. As Eureka doesn’t send such events with filled endpoints, I decided to fix it with overriding InstanceDiscoveryListener which allows me to force endpoints detection.
  @Override
    protected Mono<InstanceId> registerInstance(ServiceInstance instance) {
        return super.registerInstance(instance)
                .doOnNext(endpointDetector::detectEndpoints);
    }

After that about half of the services show required tabs. Unfortunately, there are another half fo services are still with single Details tab

  1. Despite the fix above there’s some magic is present here. After restarting SBA application some of previously “correctly worked” services show single Details tab, while some other “incorrectly worked” ones show full set of tabs. After next restart it repeats with other services. And so on.

While debug source code I noticed that ProbeEndpointsStrategy detect actuator endpoints for all services, but then it cannot propagate next.

Moreover, the issue I found relates to this method:

    public Mono<Endpoints> detectEndpoints(Instance instance) {
        return Flux.fromIterable(endpoints) // 1
                .flatMap(endpoint -> detectEndpoint(instance, endpoint))// 2
                .collectList()// 3
                .flatMap(this::convert);// 4
    }

While after //1 and //2 all endpoints are present, // 3 step returns empty list unpredictably, so //4 doesn’t even run

I’ve shared all my investigations with you and I suppose some of them can be going in wrong direction, but anyway the issue is still exists

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

0reactions
igorermolenkocommented, Oct 25, 2018

Johannes, can you tell me, please, when 2.1.0 release is planned?

Read more comments on GitHub >

github_iconTop Results From Across the Web

codecentric/spring-boot-admin - Gitter
In my client application.properties i have spring.boot.admin.client.url=http://localhost:8090 and management.endpoints.web.exposure.include=*. When I boot up, ...
Read more >
Eureka service UP, SBA DOWN - spring boot admin
I user SBA as discovery client (spring-boot-admin.version 2.1.5) to Eureka server. I see a registered application UP in Eureka server, ...
Read more >
Spring Boot Admin Reference Guide - GitHub Pages
Tell the Eureka client where to find the service registry: ... By default the logfile is not accessible via actuator endpoints and therefore ......
Read more >
Production-ready Features - Spring
Actuator endpoints let you monitor and interact with your application. Spring Boot includes a number of built-in endpoints and lets you add your...
Read more >
Vol. 81 Thursday, No. 150 August 4, 2016 Pages 51297–51772
Federal Register. 51297. Vol. 81, No. 150. Thursday, August 4, 2016. DEPARTMENT OF AGRICULTURE. Agricultural Marketing Service.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found