会话复制在多节点群集上的glassfish中不起作用 [英] Session replication not working in glassfish on multi node cluster

查看:73
本文介绍了会话复制在多节点群集上的glassfish中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

会话复制在多节点群集上的glassfish中不起作用

Session replication not working in glassfish on multi node cluster

1)应用程序在web.xml中包含可分发标记 2)当应用程序部署在群集c1中(该群集包含同一节点上存在的2个实例)时,会话复制即可工作. 3)在群集c2中部署相同的应用程序时,该群集包含两台CentOS计算机上存在的两个实例,因此会话复制不起作用.

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.

以下是glassfish-web.xml的内容(如果需要供参考):

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>  

1)似乎不是2 centos机器之间的UDP通信问题. 2)也尝试按照HA-administration-guide中所述创建tcp-cluster,但效果仍然相同,会话未在tcpcluster上复制.

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.

推荐答案

Shoal中存在一个错误,并且与Grizzly不兼容.我已经在Payara中修复了它,现在在Glassfish中也修复了它. 当前状态是似乎可行(Payara 4.1.1.154).

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).

这篇关于会话复制在多节点群集上的glassfish中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆