Cluster Replication of Authenticated Sessions Still Requires Login Upon Failover
I am trying to configure a 2-Node Cluster using Delta Manager to Replicate Authenticated Sessions. We are using HAproxy as the load balancer configured for sticky sessions. Load balancer appends ".s1" and ".s2" to session cookie (JSESSIONID only, no data).
To test failover, I am doing the following:
- start up each tomcat instance in its own separate VPS
- in browser, launch webapp from domain name assigned to load balancer
- authenticate as admin via tomcat form-based authentication
- review logs to identify the node the load balancer is forwarding requests to
- interact with webapp, then shutdown tomcat instance running on node identified in step 4.
- review logs to confirm that failover to other node occurs
- continue to interact with webapp
Step 7 fails as it causes the login page to re-appear for me to re-authenticate. When I login again, the webapp starts fresh (i.e. it doesn't continue from where it left off in step 5).
I've looked at catalina.out in failover node and it shows that the "Principal [admin] is set to session" -- but the session id specified (EA02..) is different from the failover session id (C20E...) -- and I don't know if this is correct?
I've added jvmRoute to both server.xml files based on HAproxy configuration "s1" and "s2"
Any ideas on what else I should check? Does a session cookie with no data still need to be serialized?
Also, I should mention that I am seeing lots of these messages even BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
From Node 2 catalina.out file:
FINE: Detected a failover with different jvmRoute - orginal route: [s1] new one: [s2] at session id [C20E9194B5FF032546C6C408E35511C9.s1]
....
Feb 08, 2019 1:10:32 PM org.apache.catalina.ha.session.JvmRouteBinderValve handleJvmRoute
FINE: Cant find session [{0}]
....
Also, I should mention that I am seeing lots of these messages when I start tomcat and BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
authentication tomcat cluster replication haproxy
add a comment |
I am trying to configure a 2-Node Cluster using Delta Manager to Replicate Authenticated Sessions. We are using HAproxy as the load balancer configured for sticky sessions. Load balancer appends ".s1" and ".s2" to session cookie (JSESSIONID only, no data).
To test failover, I am doing the following:
- start up each tomcat instance in its own separate VPS
- in browser, launch webapp from domain name assigned to load balancer
- authenticate as admin via tomcat form-based authentication
- review logs to identify the node the load balancer is forwarding requests to
- interact with webapp, then shutdown tomcat instance running on node identified in step 4.
- review logs to confirm that failover to other node occurs
- continue to interact with webapp
Step 7 fails as it causes the login page to re-appear for me to re-authenticate. When I login again, the webapp starts fresh (i.e. it doesn't continue from where it left off in step 5).
I've looked at catalina.out in failover node and it shows that the "Principal [admin] is set to session" -- but the session id specified (EA02..) is different from the failover session id (C20E...) -- and I don't know if this is correct?
I've added jvmRoute to both server.xml files based on HAproxy configuration "s1" and "s2"
Any ideas on what else I should check? Does a session cookie with no data still need to be serialized?
Also, I should mention that I am seeing lots of these messages even BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
From Node 2 catalina.out file:
FINE: Detected a failover with different jvmRoute - orginal route: [s1] new one: [s2] at session id [C20E9194B5FF032546C6C408E35511C9.s1]
....
Feb 08, 2019 1:10:32 PM org.apache.catalina.ha.session.JvmRouteBinderValve handleJvmRoute
FINE: Cant find session [{0}]
....
Also, I should mention that I am seeing lots of these messages when I start tomcat and BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
authentication tomcat cluster replication haproxy
add a comment |
I am trying to configure a 2-Node Cluster using Delta Manager to Replicate Authenticated Sessions. We are using HAproxy as the load balancer configured for sticky sessions. Load balancer appends ".s1" and ".s2" to session cookie (JSESSIONID only, no data).
To test failover, I am doing the following:
- start up each tomcat instance in its own separate VPS
- in browser, launch webapp from domain name assigned to load balancer
- authenticate as admin via tomcat form-based authentication
- review logs to identify the node the load balancer is forwarding requests to
- interact with webapp, then shutdown tomcat instance running on node identified in step 4.
- review logs to confirm that failover to other node occurs
- continue to interact with webapp
Step 7 fails as it causes the login page to re-appear for me to re-authenticate. When I login again, the webapp starts fresh (i.e. it doesn't continue from where it left off in step 5).
I've looked at catalina.out in failover node and it shows that the "Principal [admin] is set to session" -- but the session id specified (EA02..) is different from the failover session id (C20E...) -- and I don't know if this is correct?
I've added jvmRoute to both server.xml files based on HAproxy configuration "s1" and "s2"
Any ideas on what else I should check? Does a session cookie with no data still need to be serialized?
Also, I should mention that I am seeing lots of these messages even BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
From Node 2 catalina.out file:
FINE: Detected a failover with different jvmRoute - orginal route: [s1] new one: [s2] at session id [C20E9194B5FF032546C6C408E35511C9.s1]
....
Feb 08, 2019 1:10:32 PM org.apache.catalina.ha.session.JvmRouteBinderValve handleJvmRoute
FINE: Cant find session [{0}]
....
Also, I should mention that I am seeing lots of these messages when I start tomcat and BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
authentication tomcat cluster replication haproxy
I am trying to configure a 2-Node Cluster using Delta Manager to Replicate Authenticated Sessions. We are using HAproxy as the load balancer configured for sticky sessions. Load balancer appends ".s1" and ".s2" to session cookie (JSESSIONID only, no data).
To test failover, I am doing the following:
- start up each tomcat instance in its own separate VPS
- in browser, launch webapp from domain name assigned to load balancer
- authenticate as admin via tomcat form-based authentication
- review logs to identify the node the load balancer is forwarding requests to
- interact with webapp, then shutdown tomcat instance running on node identified in step 4.
- review logs to confirm that failover to other node occurs
- continue to interact with webapp
Step 7 fails as it causes the login page to re-appear for me to re-authenticate. When I login again, the webapp starts fresh (i.e. it doesn't continue from where it left off in step 5).
I've looked at catalina.out in failover node and it shows that the "Principal [admin] is set to session" -- but the session id specified (EA02..) is different from the failover session id (C20E...) -- and I don't know if this is correct?
I've added jvmRoute to both server.xml files based on HAproxy configuration "s1" and "s2"
Any ideas on what else I should check? Does a session cookie with no data still need to be serialized?
Also, I should mention that I am seeing lots of these messages even BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
From Node 2 catalina.out file:
FINE: Detected a failover with different jvmRoute - orginal route: [s1] new one: [s2] at session id [C20E9194B5FF032546C6C408E35511C9.s1]
....
Feb 08, 2019 1:10:32 PM org.apache.catalina.ha.session.JvmRouteBinderValve handleJvmRoute
FINE: Cant find session [{0}]
....
Also, I should mention that I am seeing lots of these messages when I start tomcat and BEFORE I launch my webapp:
FINE: Created a DeltaSession with Id [EBA26338D57AAD6ECD31D29264C925D9.s1] Total count=58
authentication tomcat cluster replication haproxy
authentication tomcat cluster replication haproxy
asked Feb 8 at 22:55
Nacho GanguliNacho Ganguli
11
11
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403702%2fcluster-replication-of-authenticated-sessions-still-requires-login-upon-failover%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403702%2fcluster-replication-of-authenticated-sessions-still-requires-login-upon-failover%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown