-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using @RefreshScope on configuration with RestHighLevelClient leads to null restClient #852
Comments
Furthermore due to this issue, when healthcheck with actuator on the elasticsearch cluster, it uses the default localhost:9200 instead of the configured host. |
Hi, did you manage to find a workaround? |
No, I remove the @RefreshScope annotation for the time being. |
Have you tried passing the dependencies as method parameters rather than method calls? |
This doesn't fix the problem with the null client. |
I'm unable to reproduce this. Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file. |
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. |
Here is a full exemple. Launch the application and you will see in the startup logs:
This mean the restHighLevelClient used to create the index is null. |
Describe the bug
With spring data elasticsearch, when we used @RefreshScope on the configuration, the restClient is null and thus we can't perform operation on the cluster. Without this, it work perfectly fine.
Spring version:
spring boot starter parent 2.3.5
spring cloud config : 2.2.4
spring boot data elasticsearch 4.0.5
Sample
Thanks
The text was updated successfully, but these errors were encountered: