I am testing to get the Memcached session faillover working with 2 Tomcat instances both running Tomcat 6 (6.0.30) running on the same server.
I realize this config is not best practice but I only have one web server I can test this with for now so I'm just trying to make sure I can get it to work properly. This is a pre-test for a migration that is planned.
We use session stickyness so I'll check the cookie to tell me which tomcat worker I'm on (w4worker1, w4worker2) and I'll kill the tomcat instance I'm on and then instead of being able to continue to use the application I get sent to the login page. In this case, I was on w4worker1 and killed Tomcat w4worker1 hoping to get resolved to w4worker2
The following 3 jars were each copied in the Tomcat lib folder: memcached-session-manager-tc6-2.1.1.jar, memcached-session-manager-2.1.1.jar and spymemcached-2.11.1.jar
Jun 6, 2017 10:05:36 AM de.javakaffee.web.msm.JavaSerializationTranscoder writeAttributes
FINE: storing attribute 'session.appUserId' with value '11178'
Jun 6, 2017 10:05:36 AM de.javakaffee.web.msm.JavaSerializationTranscoder writeAttributes
Jun 6, 2017 10:05:36 AM de.javakaffee.web.msm.JavaSerializationTranscoder writeAttributes
Jun 6, 2017 10:05:36 AM de.javakaffee.web.msm.JavaSerializationTranscoder writeAttributes
FINE: storing attribute 'javax.servlet.jsp.jstl.fmt.request.charset' with value 'ISO-8859-1'
Jun 6, 2017 10:05:36 AM de.javakaffee.web.msm.JavaSerializationTranscoder writeAttributes
FINE: storing attribute 'ACEGI_SECURITY_LAST_USERNAME' with value 'charlesrich'
Jun 6, 2017 10:05:36 AM de.javakaffee.web.msm.BackupSessionTask call
FINE: Finished for session id 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1, returning status SKIPPED
Jun 6, 2017 10:05:37 AM de.javakaffee.web.msm.MemcachedSessionService updateExpirationInMemcached
FINE: Checking session 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1:
- isValid: true
- isExpiring: false
- isBackupRunning: false
- isExpirationUpdateRunning: false
- wasAccessedSinceLastBackup: true
- memcachedExpirationTime: 1772
Jun 6, 2017 10:05:37 AM de.javakaffee.web.msm.MemcachedSessionService updateExpirationInMemcached
FINE: Checking session 8A1A3FD76E84C5E060E96F088A7F61C0-n2.w4worker1:
- isValid: true
- isExpiring: false
- isBackupRunning: false
- isExpirationUpdateRunning: false
- wasAccessedSinceLastBackup: false
- memcachedExpirationTime: 1474
Jun 6, 2017 10:05:38 AM de.javakaffee.web.msm.RequestTrackingHostValve invoke
FINE: >>>>>> Ignoring: GET /assets/lang/en-au/css/default.css (requestedSessionId 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1) ==================
Jun 6, 2017 10:05:38 AM de.javakaffee.web.msm.RequestTrackingHostValve invoke
FINE: <<<<<< Ignored: GET /assets/lang/en-au/css/default.css ==================
Jun 6, 2017 10:05:47 AM de.javakaffee.web.msm.MemcachedSessionService updateExpirationInMemcached
FINE: Checking session 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1:
- isValid: true
- isExpiring: false
- isBackupRunning: false
- isExpirationUpdateRunning: false
- wasAccessedSinceLastBackup: true
- memcachedExpirationTime: 1762
Jun 6, 2017 10:05:47 AM de.javakaffee.web.msm.MemcachedSessionService updateExpirationInMemcached
FINE: Checking session 8A1A3FD76E84C5E060E96F088A7F61C0-n2.w4worker1:
- isValid: true
- isExpiring: false
- isBackupRunning: false
Jun 6, 2017 10:05:48 AM de.javakaffee.web.msm.RequestTrackingHostValve invoke
FINE: >>>>>> Request starting: GET / (requestedSessionId null) ==================
Jun 6, 2017 10:05:48 AM de.javakaffee.web.msm.MemcachedSessionService backupSession
FINE: No session found in session map for kqkIKdftAWWCW17tuBXt.w4worker2
Jun 6, 2017 10:05:48 AM de.javakaffee.web.msm.RequestTrackingHostValve logDebugResponseCookie
FINE: Request finished, with Set-Cookie header: JSESSIONID=kqkIKdftAWWCW17tuBXt.w4worker2; Path=/
Jun 6, 2017 10:05:48 AM de.javakaffee.web.msm.RequestTrackingHostValve invoke
FINE: <<<<<< Request finished: GET / ==================
Jun 6, 2017 10:06:07 AM de.javakaffee.web.msm.RequestTrackingHostValve invoke
FINE: >>>>>> Request starting: GET /searchViewUser.htm (requestedSessionId 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1) ==================
Jun 6, 2017 10:06:07 AM de.javakaffee.web.msm.SessionIdFormat createSessionId
FINE: Creating new session id with orig id 'ping' and memcached id 'n2'.
Jun 6, 2017 10:06:07 AM de.javakaffee.web.msm.NodeAvailabilityCache updateIsNodeAvailable
FINE: CacheLoader returned node availability 'true' for node 'n2'.
Jun 6, 2017 10:06:07 AM de.javakaffee.web.msm.MemcachedSessionService loadFromMemcached
FINE: Loading session from memcached: 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1
Jun 6, 2017 10:06:07 AM de.javakaffee.web.msm.JavaSerializationTranscoder deserializeAttributes
FINE: loading attribute 'scopedTarget.userSession' with value 'com.thelearningbar.web.security.UserSession@7044fa1f'
Jun 6, 2017 10:06:07 AM de.javakaffee.web.msm.JavaSerializationTranscoder deserializeAttributes
Memcache N1 node:
slab class 39: chunk size 493552 perslab 2
slab class 40: chunk size 616944 perslab 1
slab class 41: chunk size 771184 perslab 1
slab class 42: chunk size 1048576 perslab 1
<26 server listening (auto-negotiate)
<27 server listening (auto-negotiate)
<28 send buffer was 124928, now 268435456
<29 send buffer was 124928, now 268435456
<28 server listening (udp)
<28 server listening (udp)
<28 server listening (udp)
<28 server listening (udp)
<29 server listening (udp)
<29 server listening (udp)
<29 server listening (udp)
<29 server listening (udp)
<30 new auto-negotiating client connection
<31 new auto-negotiating client connection
<32 new auto-negotiating client connection
<33 new auto-negotiating client connection
<34 new auto-negotiating client connection
<35 new auto-negotiating client connection
<36 new auto-negotiating client connection
<37 new auto-negotiating client connection
<38 new auto-negotiating client connection
<39 new auto-negotiating client connection
<40 new auto-negotiating client connection
<41 new auto-negotiating client connection
<42 new auto-negotiating client connection
<40 connection closed.
<41 connection closed.
<38 connection closed.
<39 connection closed.
<37 connection closed.
<42 connection closed.
<37 new auto-negotiating client connection
<38 new auto-negotiating client connection
<39 new auto-negotiating client connection
<40 new auto-negotiating client connection
<41 new auto-negotiating client connection
<42 new auto-negotiating client connection
<32 connection closed.
<35 connection closed.
<30 connection closed.
<34 connection closed.
<33 connection closed.
<36 connection closed.
<31 connection closed.
<30 new auto-negotiating client connection
<31 new auto-negotiating client connection
<32 new auto-negotiating client connection
<33 new auto-negotiating client connection
<34 new auto-negotiating client connection
<35 new auto-negotiating client connection
<36 new auto-negotiating client connection
<32 connection closed.
<33 connection closed.
<35 connection closed.
<36 connection closed.
<34 connection closed.
<31 connection closed.
<30 connection closed.
Memcache N2 node:
<31 set 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1 0 1794 236
>31 STORED
<31 set 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1 0 1794 2607
>31 STORED
<31 set 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1 0 1794 2679
>31 STORED
<31 get ping-n2
>31 END
<31 set 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1 0 1794 17463
>31 STORED
<31 set 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1 0 1794 17512
>31 STORED
<31 get ping-n2
>31 END
<31 get ping-n2
>31 END
<31 get ping-n2
>31 END
<32 connection closed.
<35 connection closed.
<36 connection closed.
<33 connection closed.
<34 connection closed.
<31 connection closed.
<30 connection closed.
<37 get ping-n2
>37 END
<37 get 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1
>37 sending key 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1
>37 END
<37 delete 9F3C07D8038448D194E01D945E07D85E-n2.w4worker1
>37 DELETED
<37 set 9F3C07D8038448D194E01D945E07D85E-n2.w4worker2 0 1794 17510
>37 STORED
I can attach the actual log files if need be. Please let me know if I should attach them directly to this post or somewhere else if attaching the log files would be more useful.
I appreciate any hints on how to troubleshoot this.
Thanks,
Charles