Skip to content
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

DefaultStreamMessageListenerContainer can't close #2939

Closed
sanwzzz opened this issue Jul 11, 2024 · 4 comments
Closed

DefaultStreamMessageListenerContainer can't close #2939

sanwzzz opened this issue Jul 11, 2024 · 4 comments
Assignees
Labels
status: invalid An issue that we don't feel is valid

Comments

@sanwzzz
Copy link

sanwzzz commented Jul 11, 2024

When I close Spring, it outputs the following information to the stack.

2024-07-11 19:57:52.900 [ERROR] [SimpleAsyncTaskExecutor-5] [rContainer$LoggingErrorHandler] Unexpected error occurred in scheduled task
org.springframework.dao.InvalidDataAccessApiUsageException: Redisson is shutdown
	at org.redisson.spring.data.connection.RedissonExceptionConverter.convert(RedissonExceptionConverter.java:52)
	at org.redisson.spring.data.connection.RedissonExceptionConverter.convert(RedissonExceptionConverter.java:35)
	at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:40)
	at org.redisson.spring.data.connection.RedissonConnection.transform(RedissonConnection.java:208)
	at org.redisson.spring.data.connection.RedissonConnection.syncFuture(RedissonConnection.java:203)
	at org.redisson.spring.data.connection.RedissonConnection.sync(RedissonConnection.java:374)
	at org.redisson.spring.data.connection.RedissonConnection.write(RedissonConnection.java:740)
	at org.redisson.spring.data.connection.RedissonStreamCommands.xReadGroup(RedissonStreamCommands.java:655)
	at org.springframework.data.redis.stream.DefaultStreamMessageListenerContainer.lambda$getReadFunction$3(DefaultStreamMessageListenerContainer.java:236)
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:396)
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:363)
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:350)
	at org.springframework.data.redis.stream.DefaultStreamMessageListenerContainer.lambda$getReadFunction$4(DefaultStreamMessageListenerContainer.java:235)
	at org.springframework.data.redis.stream.StreamPollTask.readRecords(StreamPollTask.java:146)
	at org.springframework.data.redis.stream.StreamPollTask.doLoop(StreamPollTask.java:127)
	at org.springframework.data.redis.stream.StreamPollTask.run(StreamPollTask.java:112)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.redisson.RedissonShutdownException: Redisson is shutdown
	at org.redisson.connection.ServiceManager.lambda$shutdownFutures$2(ServiceManager.java:362)
	at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4709)
	at java.base/java.util.Collections$SetFromMap.forEach(Collections.java:5944)
	at org.redisson.connection.ServiceManager.shutdownFutures(ServiceManager.java:362)
	at org.redisson.connection.MasterSlaveConnectionManager.shutdown(MasterSlaveConnectionManager.java:505)
	at org.redisson.connection.MasterSlaveConnectionManager.shutdown(MasterSlaveConnectionManager.java:490)
	at org.redisson.Redisson.shutdown(Redisson.java:1121)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:316)
	at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:249)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:587)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:559)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:1202)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:520)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:1195)
	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1186)
	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1147)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:174)
	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1093)
	at org.springframework.boot.SpringApplicationShutdownHook.closeAndWait(SpringApplicationShutdownHook.java:145)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at org.springframework.boot.SpringApplicationShutdownHook.run(SpringApplicationShutdownHook.java:114)
	... 1 common frames omitted

And my StreamMessageListenerContainer
Clip_2024-07-11_20-09-27

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 11, 2024
@sanwzzz
Copy link
Author

sanwzzz commented Jul 11, 2024

And Listenet. No data in stream
version: spring-data-redis-3.2.4
Clip_2024-07-11_20-13-00

@sanwzzz
Copy link
Author

sanwzzz commented Jul 11, 2024

so, Is it the same problem as #2261 ?

@christophstrobl christophstrobl self-assigned this Jul 15, 2024
@christophstrobl
Copy link
Member

@sanwzzz thank you for reaching out. Please do not use images to provide issue details, but take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.

However, the Redisson driver is not directly supported by the data-redis project, and though the issue sounds similar to the existing one you linked, I'll be therefore closing this issue.

@christophstrobl christophstrobl closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@christophstrobl christophstrobl added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 15, 2024
@gx2529087850
Copy link

@sanwzzz 你后面解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants