question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HttpSessionListener#sessionDestoyed isn't invoked (Tomcat 8)

See original GitHub issue

Description

I have two nodes:

  • node 1 -> N1
  • node 2 -> N2

Expected behaviour

sessionDestroyed event must be handled by both nodes

Actual behaviour

sessionDestroyed event handled only by N1

Steps to reproduce or test case

WHEN client log in N1 THEN N1 and N2 receive sessionCreated event AND service invalidate session (on N1) THEN sessionDestroyed event handle only N1

Redis version

Redis server v=3.2.6 sha=00000000:0 malloc=jemalloc-4.0.3 bits=64 build=6135068212e7fc88

Redisson version

3.10.7

Redisson configuration

redisson.conf

{
	"singleServerConfig": {
		"idleConnectionTimeout": 10000,
		"pingTimeout": 1000,
		"connectTimeout": 10000,
		"timeout": 3000,
		"retryAttempts": 3,
		"retryInterval": 1500,
		"password": null,
		"subscriptionsPerConnection": 5,
		"clientName": null,
		"address": "redis://some-ip",
		"subscriptionConnectionMinimumIdleSize": 1,
		"subscriptionConnectionPoolSize": 50,
		"connectionMinimumIdleSize": 32,
		"connectionPoolSize": 64,
		"database": 0,
		"dnsMonitoringInterval": 5000
	},
	"threads": 0,
	"nettyThreads": 0,
	"codec": {
		"class": "org.redisson.codec.SerializationCodec"
	},
	"transportMode": "NIO"
}

context.xml

<Manager className="org.redisson.tomcat.RedissonSessionManager"
          configPath="${catalina.base}/conf/redisson.conf" readMode="MEMORY" updateMode="DEFAULT" broadcastSessionEvents="true"/>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sibmakscommented, May 31, 2019

@mrniko I think that this looks like a bug. Because if I invalidate session on the node then I expect get new a new session. What do you think?

0reactions
mrnikocommented, Jun 5, 2019

@JiriFrankCZ

Thanks for checking! Fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Session Listener ( HttpSessionListener) is not working
I am using the most recent version of Tomcat Server(4.1.8). I have a simple Test Servlet which is using HttpSessionListener.
Read more >
HttpSessionListener.sessionDestroyed() sometimes not called?
Hi, I have a customer support chat webapp where when the attendant session expires, I need to end all his active conversations and...
Read more >
java - HttpSessionListener not detecting session timeout
I have got the same problem with Tomcat and Java 1.7: 'sessionDestroyed' is not always invoked after session timeout while browser is opened....
Read more >
HttpSessionListener Example – Monitoring - Baeldung
This tutorial will show how to register a javax.servlet.http.HttpSessionListener and track the number of active sessions in the web application ...
Read more >
[KB5550] Apache Tomcat is not running (service could not start)
Starting January 2019, Oracle JAVA SE 8 public updates for business, commercial or production use will require a commercial license. If you do ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found