Reputation: 33
Session replication not working in glassfish on multi node cluster
1) application contains distributable tag in web.xml 2) application when deployed in cluster c1, which contains 2 instances present on same node, session replication works. 3) Same application when deployed in cluster c2, which contains 2 instances present on two CentOS machines, session replication does not works.
Following are content of glassfish-web.xml (if required for reference) :
<glassfish-web-app error-url="">
<session-config>
<session-manager persistence-type="replicated">
<manager-properties>
<property name="persistenceFrequency" value="web-method" />
<property name="relaxCacheVersionSemantics" value="true"/>
</manager-properties>
<store-properties>
<property name="persistenceScope" value="session" />
</store-properties>
</session-manager>
<!--<cookie-properties>
<property name="cookieDomain" value="node2"/>
<property name="cookieDomain" value="node4"/>
</cookie-properties> -->
<cache max-entries="4096" timeout-in-seconds="30" enabled="false">
<default-helper/>
</cache>
</session-config>
<context-root>/contextNaam</context-root>
<class-loader delegate="true"/>
<resource-ref>
<res-ref-name>jdbc/safe</res-ref-name>
<jndi-name>jdbc/safe</jndi-name>
</resource-ref>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
Edit : 1) Does not seems to be a UDP communication issue between 2 centos machines. 2) Tried to create tcp-cluster as mentioned in HA-administration-guide also, but still same effect, session not replicated on tcpcluster.
Upvotes: 2
Views: 915
Reputation: 1586
There was a bug in Shoal and incompatibility with Grizzly. I have fixed it in Payara and the fix is now in Glassfish too. Current state is that it seems it works (Payara 4.1.1.154).
Upvotes: 1
Reputation: 75
Under CentOS, you might run into trouble with SELinux and firewall rules. I suggest you disable them and try again.
I had a similar issue, though using JBoss, not Glassfish.
E.
Upvotes: 0