when spring boot is upgraded from 1.5.X to 2.X, which causes above warning.
is there any way to stop it?
warning is output every 3 seconds.
018-09-17 02:19:39.536 WARN [enerContainer-3] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session e8c84161-028c-46e5-b3a8-823c7c2f146d at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:19:47.379 WARN [enerContainer-7] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 435fd247-a9fa-4494-b5fd-d6c187c094ee at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:19:49.682 WARN [enerContainer-9] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 71ec2f61-18e2-4a9a-81d6-a713d0516101 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:00.090 WARN [nerContainer-15] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 1dd02046-6f92-400f-ae1d-005e481ed4f2 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:00.156 WARN [nerContainer-16] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 027aad73-31d0-4e92-98c4-b7b251cdd0c0 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:17.047 WARN [nerContainer-23] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 3e0c514e-6435-457b-83e0-7b6bc57e7e9c at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:24.864 WARN [nerContainer-29] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session b356a6a5-e5b1-4269-9a52-1ea5453ac177 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:25.064 WARN [nerContainer-30] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session ccd04689-f11f-454f-94ea-3365ca362ec6 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:28.112 WARN [nerContainer-31] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session d30dbf99-8cf8-4886-83db-4855054d9628 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:30.346 WARN [nerContainer-33] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 8493a12d-8e55-4905-84ef-95072aed2940 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:41.392 WARN [nerContainer-37] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 2c80ef32-0221-40e0-b0c4-037ef1a6e152 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:49.203 WARN [nerContainer-43] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 3823286e-9f19-462f-8773-5e68e087c650 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:49.804 WARN [nerContainer-44] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 06c49807-ab00-4369-b3f4-d45640adc6e3 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:50.420 WARN [nerContainer-45] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 7d808c10-f6b4-429d-b38f-b7f6fa17be63 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:56.221 WARN [nerContainer-49] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session 2610eb7a-a8e5-484e-b722-eceadf2664e2 at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
2018-09-17 02:20:56.315 WARN [nerContainer-50] s.s.d.r.RedisOperationsSessionRepository : Unable to publish SessionDestroyedEvent for session a51bf928-a54c-4153-a4d8-4e8dde57bfdc at org.springframework.session.data.redis.RedisOperationsSessionRepository.(RedisOperationsSessionRepository.java:520)
Thanks for the report @pch851130 - as mentioned in #1029 (comment), please provide as much details as possible (exact versions you're using, relevant config) or, even better, a minimal, complete, and verifiable example that we can use to reproduce the problem.
I am using this version. The source code is too large to share.
@vpavic
May I just ignore that message?
What does that message mean?
I have read the linked document below, but I do not know what it means.
https://github.com/spring-projects/spring-session/issues/1029
https://github.com/spring-projects/spring-session/issues/1047
@vpavic
warning occurs even though there is no code to reference the library.
if add a library, get a warning. If remove a library, not get a warning.
@pch851130 This message means that session record for which the event was raised was not present when event was handled. You can learn more about how RedisOperationsSessionRepository handles session expirations and events in the reference manual.
You shouldn't be ignoring these warning, as they suggest something is not right. We've had a few issues related to this, on top of the two issues you link also take a look a #499 and #1128.
warning occurs even though there is no code to reference the library.
If I understand correctly, you're having Spring Boot auto-configure Spring Session for you, and there is no explicit configuration of Spring Session involved? Is anything other interacting with this Redis instance? Are you perhaps using multiple Redis databases inside the same Redis instance (see #1128)?
The source code is too large to share.
Please understand that we need a way to reproduce this issue in order to be able to reliably fix it. Minimal, complete, and verifiable example is not about sharing your existing codebase but rather about creating a minimal sample that can be used to isolate and reproduce the problem.
Closing due to lack of feedback. Please comment back if you can provide more details and we can re-open the issue.
Most helpful comment
@pch851130 This message means that session record for which the event was raised was not present when event was handled. You can learn more about how
RedisOperationsSessionRepositoryhandles session expirations and events in the reference manual.You shouldn't be ignoring these warning, as they suggest something is not right. We've had a few issues related to this, on top of the two issues you link also take a look a #499 and #1128.
If I understand correctly, you're having Spring Boot auto-configure Spring Session for you, and there is no explicit configuration of Spring Session involved? Is anything other interacting with this Redis instance? Are you perhaps using multiple Redis databases inside the same Redis instance (see #1128)?
Please understand that we need a way to reproduce this issue in order to be able to reliably fix it. Minimal, complete, and verifiable example is not about sharing your existing codebase but rather about creating a minimal sample that can be used to isolate and reproduce the problem.