-
Notifications
You must be signed in to change notification settings - Fork 783
spring lettuce startup get blocks when including spring-cloud-starter-zipkin #1557
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
Comments
@mp911de have you seen such a problem before? |
Do you mean |
From what I understand this the problem BTW @WEIZIBIN you know that we have Hoxton.SR1 ? |
The application startup gets stuck (blocked). There are two things that come together:
Since the context is not fully started, the startup lock prevents progress each time a thread different than
|
Thanks, I have reached the same conclusion after using the jstack command. Has this issue been resolved now? @mp911de |
I upgraded to Hoxton.SR1 and still have the same problem. @marcingrzejszczak |
spring-boot-2.2.4+spring-cloud Hoxton.SR1 have the same problem |
My current solution is to execute it before redis executes the command. Is there a better solution? |
Hey @WEIZIBIN , this is an extremely interesting case. I had a chat with @mp911de and we have the following conclusions: The problem is here in @Configuration(proxyBeanMethods = false)
@ConditionalOnBean(
type = "org.springframework.cloud.context.scope.refresh.RefreshScope")
protected static class RefreshScopedSamplerConfiguration {
@Bean
@RefreshScope
@ConditionalOnMissingBean
public Sampler defaultTraceSampler(SamplerProperties config) {
return samplerFromProps(config);
}
} Since we're using In order for you to have a workaround, you can use what you mentioned or create your own sampler bean e.g. using the always sampler if that's ok for you. @Bean
public Sampler mySampler() {
return Sampler.ALWAYS_SAMPLE;
} Now I guess we'd need to chat with @dsyer and @spencergibb (cc @ryanjbaxter, @OlgaMaciaszek ) about those refresh scope proxies and their usage in |
Is the bug fixed? |
Pinging @dsyer and @spencergibb (cc @ryanjbaxter, @OlgaMaciaszek ) about those refresh scope proxies and their usage in @PostConstruct annotated methods. Any ideas how to fix this? |
The suggested solution to this problem is
Best solution would be not to use the redis stuff from |
+1 |
I am getting similar error when trying to connect to redis from spring boot application, from the
Spring boot console log stuck after these two messages:
The error is coming from io.lettuce.core.AbstractRedisClient
Please let me know if this is the same issue and how can i proceed further. pom.xml
|
You have not provided which version of cloud, boot and sleuth you're using. Please update to the latest versions and try again |
I am not using these two in my project. |
So why are you commenting on a sleuth lettuce integration issue in a sleuth project that depends on boot is you're neither using sleuth nor boot? |
I have been stuck with this error and the only closest thing which i could find was this post, and the errors being faced here matches with mine since its coming from the exact same line in the lettuce module. |
We can only help with spring cloud sleuth integration with lettuce. You'll need to find help elsewhere. |
Describe the bug
Spring redis get connection block when include spring-cloud-starter-zipkin.
If pom.xml not include spring-cloud-starter-zipkin, then redis success get connection.
Sample
Sample Project
block in io.lettuce.core.AbstractRedisClient#getConnection()
The text was updated successfully, but these errors were encountered: