Hey guys hope all is well.

I had a quick question about the health check for config server’s vault backend.

I seem to be having some trouble with it – I’m not able to access health for vault repo without an exception being thrown “No thread-bound request found”.

To illustrate the problem, I connect to vault backend. I created a ScheduledExecutorService that calls health on every HealthIndicator, every 30 seconds. The health check to vault repo fails.

On the other hand if I curl the actuator health endpoint the health check to vault repo, the health check succeeds. (curl localhost:8888/actuator/health).

I think this may have to do with ThreadLocal usage of RequestAttributes from ObjectProvider(HttpServletRequest) request called from AbstractVaultEnvironmentRepository::getWatchState.

I am using all the latest versions of projects: spring-cloud-config-server 3.1.2, spring-cloud-starter-bootstrap 3.1.2 and spring-boot-starter-actuator 2.6.7.

I’ve attached my simple, repeatable project here: https://github.com/speedo72/spring-cloud-config-vault-health Thanks for any help.

Comment From: ryanjbaxter

So are you calling the HealthIndicator in some other way besides hitting the actuator endpoint?

Comment From: spring-cloud-issues

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.

Comment From: marcpintoo

Hey @ryanjbaxter thanks for the response. Yes am using HealthIndicator interface to manually check health unrelated to hitting actuator endpoint. I'm assuming this isn't the intended behavior. If so - happy to close this issue and avoid checking health that way.

Thanks for your contributions to the spring world.