users@glassfish.java.net

two node session replication failing

From: <glassfish_at_javadesktop.org>
Date: Thu, 21 Oct 2010 07:57:12 PDT

I have a two node cluster that fails to retain the JSESSIONID, Session Value and Session Attribute on fail-over to opposite node. I am behind a Cisco LB, and have tcpdumps from each machine showing the fail-over and the issuance of a new JSESSIONID instead of retaining the existing session.

Following are the install instructions I followed.

Install jdk-6u20-linux-i586-rpm.bin

export JAVA_HOME=/usr/java/jdk1.6.0_20

cp glassfish-installer-v2.1.1-b31g-linux.jar /app

cd /app

java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-linux.jar

cd /app/glassfish

chmod -R +x lib/ant/bin/

./lib/ant/bin/ant -f setup-cluster.xml

Remove 32 bit jdk and install x64 bit jdk
[root_at_itegfad01 usr]# rpm -qa | grep jdk jdk-1.6.0_20-fcs

[root_at_itegfad01 usr]# rpm -qa --last | grep jdk
jdk-1.6.0_20-fcs Wed 13 Oct 2010 03:45:55 PM CDT

[root_at_itegfad01 usr]# rpm -e --test jdk-1.6.0_20-fcs

[root_at_itegfad01 usr]# rpm -e jdk-1.6.0_20-fcs

Install jdk-6u20-linux-x64-rpm.bin

cd /app/glassfish/bin/

[root_at_itegfad01 bin]# ./asadmin start-domain domain1
Starting Domain domain1, please wait.
Default Log location is /app/glassfish/domains/domain1/logs/server.log.
Redirecting output to /app/glassfish/domains/domain1/logs/server.log
Domain domain1 started.
Domain [domain1] is running [Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)] with its configuration and logs at: [/app/glassfish/domains].
Admin Console is available at [http://localhost:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://itegfad01:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
Domain supports application server clusters and other standalone instances.

./asadmin create-node-agent --host itegfad01 --port 4848 na-itegfad01
Please enter the admin user name>admin
Please enter the admin password>
Command create-node-agent executed successfully.

[root_at_itegfad01 bin]# ./asadmin create-cluster --host itegfad01 --port 4848 entaa-cluster
Please enter the admin user name>admin
Please enter the admin password>
Command create-cluster executed successfully.

[root_at_itegfad01 bin]# ./asadmin create-instance --host itegfad01 --port 4848 --nodeagent na-itegfad01 --cluster entaa-cluster entaa-inst1
Please enter the admin user name>admin
Please enter the admin password>
Command create-instance executed successfully.

[root_at_itegfad01 bin]# ./asadmin start-node-agent --syncinstances=true na-itegfad01
Please enter the admin user name>admin
Please enter the admin password>
Please enter the master password [Enter to accept the default]:> Enter
Redirecting output to /app/glassfish/nodeagents/na-itegfad01/agent/logs/server.log
Redirecting application output to /app/glassfish/nodeagents/na-itegfad01/agent/logs/server.log
Command start-node-agent executed successfully.


###On Node only Server (itegfad02):
Install jdk-6u20-linux-i586-rpm.bin

export JAVA_HOME=/usr/java/jdk1.6.0_20


cp glassfish-installer-v2.1.1-b31g-linux.jar /app

cd /app

java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-linux.jar

cd /app/glassfish

chmod -R +x lib/ant/bin

./lib/ant/bin/ant -f setup-cluster.xml

cd /app/glassfish/bin/

./asadmin create-node-agent --host itegfad01 --port 4848 na-itegfad02
Please enter the admin user name>admin
Please enter the admin password>
Command create-node-agent executed successfully.

[root_at_itegfad02 bin]# ./asadmin create-instance --host itegfad01 --port 4848 --nodeagent na-itegfad02 --cluster entaa-cluster entaa-inst2
Please enter the admin user name>admin
Please enter the admin password>
Command create-instance executed successfully.

[root_at_itegfad01 bin]# ./asadmin start-node-agent --syncinstances=true na-itegfad02
Please enter the admin user name>admin
Please enter the admin password>
Please enter the master password [Enter to accept the default]:> Enter
Redirecting output to /app/glassfish/nodeagents/na-itegfad02/agent/logs/server.log
Redirecting application output to /app/glassfish/nodeagents/na-itegfad02/agent/logs/server.log
Command start-node-agent executed successfully.

Deployed from the DAS within the samples/quickstart/clusterjsp dir
[root_at_itegfad01 clusterjsp]# ../../../bin/asadmin deploy --host itegfad01 --port 4848 --availabilityenabled=true --target entaa-cluster clusterjsp.ear
Please enter the admin username>admin
Please enter the admin password>
Command deploy executed successfully.

Create the Connection pool via the admin console.

Create the JDBC resource via the admin console specifying the connection pool and cluster.

Edit JVM Xmx heap. Restart DAS and nodeagents.

Can anyone see what I am doing wrong?

TIA,
-Dustyn
[Message sent by forum member 'ddiersen']

http://forums.java.net/jive/thread.jspa?messageID=485866