RestHighLevelClient in spring boot 2.1.x doesn't allow a spring cloud task to finish successfully

Steps to reproduce :

  1. Clone
  2. Run the application - The service dies after it prints the timestamp
  3. Add:
  1. Re-run the application - The service now stays alive

Spring Cloud Task - Finchley.SR3
Spring Boot - 2.0.x
Rest High Level Client - 6.4.2
The app functions as intended.
Spring Cloud Task - Greenwich.SR1
Spring Boot -2.1.x
Rest High Level Client - 6.4.2
The app exhibits the problematic behavior

Adding a configuration and beaning the RestHighLevelClient and closing the connection on task completion has no affect on this functionality.

How do you run the application? Is it with mvn run?

When using springboot with
elasticsearch, you need to be explicit with some transitive dependencies as SpringBoot declares a version 6.4...

Basically you can put this in your pom.xml:


See documentation here:

May be that could help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.