无法从Web应用程序连接coherence群集

时间:2014-04-22 20:11:35

标签: caching oracle-coherence

我有一个在Websphere应用服务器8.5上运行的Web应用程序。我在WebLogic上运行了一致性集群服务器。我想连接此Web应用程序以加入一致性集群。我得到了显示的错误:

[4/22/14 14:29:40:119 CDT] 00000074 SystemErr     R 2014-04-22 14:29:40.119/94.607 Oracle Coherence GE 12.1.2.0.0 <Info> (thread=WebContainer : 0, member=n/a): Loaded cache configuration from "file:/C:/IBM/WebSphere/AppServer/profiles/AppSrvJDK7/installedApps/Machine01Node02Cell/single-sign-on-coherence-ear.ear/single-sign-on-coherence-WAR1.0.war/WEB-INF/classes/coherence-cache-config.xml"
    [4/22/14 14:29:40:503 CDT] 00000074 SystemErr     R 2014-04-22 14:29:40.503/94.991 Oracle Coherence GE 12.1.2.0.0 <Info> (thread=WebContainer : 0, member=n/a): Created cache factory com.tangosol.net.ExtensibleConfigurableCacheFactory
    [4/22/14 14:29:41:114 CDT] 00000074 SystemErr     R 2014-04-22 14:29:41.114/95.602 Oracle Coherence GE 12.1.2.0.0 <D4> (thread=WebContainer : 0, member=n/a): TCMP bound to /172.17.108.156:8088 using SystemDatagramSocketProvider
[4/22/14 14:30:11:661 CDT] 00000074 SystemErr     R 2014-04-22 14:30:11.660/126.148 Oracle Coherence GE 12.1.2.0.0 <Warning> (thread=Cluster, member=n/a): Delaying formation of a new cluster; waiting for well-known nodes to respond

以下是我的覆盖xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<coherence
    xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config http://xmlns.oracle.com/coherence/coherence-operational-config/1.2/coherence-operational-config.xsd">

    <cluster-config>
        <member-identity>
            <cluster-name system-property="tangosol.coherence.cluster">defaultCoherenceCluster</cluster-name>
            <member-name system-property="tangosol.coherence.member">wls_cluster_1</member-name>
            <role-name system-property="tangosol.coherence.role">CacheClient</role-name>
        </member-identity>
        <unicast-listener>

            <well-known-addresses>
                <socket-address id="1">
                    <address>127.0.0.1</address>
                    <port>7003</port>
                </socket-address>
                <socket-address id="2">
                    <address>127.0.0.1</address>
                    <port>7006</port>
                </socket-address>
            </well-known-addresses>
            <!--    
            <address system-property="tangosol.coherence.localhost">localhost</address>
            <port system-property="tangosol.coherence.localport">8088</port>
            <port-auto-adjust system-property="tangosol.coherence.localport.adjust">
                true
            </port-auto-adjust>
            -->

        </unicast-listener>
        <multicast-listener>
            <time-to-live system-property="tangosol.coherence.ttl">0</time-to-live>
        </multicast-listener>
    </cluster-config>
    <configurable-cache-factory-config>
        <init-params>
            <init-param>
                <param-type>java.lang.String</param-type>
                <param-value system-property="tangosol.coherence.cacheconfig">coherence-cache-config.xml
                </param-value>
            </init-param>
        </init-params>
    </configurable-cache-factory-config>
</coherence>

从错误中,我可以看到Web应用程序无法连接到WKA。有人可以帮助我解决我无法连接的原因吗?我已经确认群集正在运行运行

2 个答案:

答案 0 :(得分:0)

您可以提供您的websphere启动脚本吗?基本上,您需要使用-D选项在启动脚本中传递localhost和port。

答案 1 :(得分:0)

您需要在Weblogic和Websphere服务器的启动脚本中将主机和端口作为JVM参数传递,同时提供所有JVM所在的机器,必须具有相互正确的连接。 JVM参数应包含weblogic和webshpere主机和端口。这样,两个服务器都可以从JVM中识别其他成员。示例参数:

COHERENCE_L_HOST="-Dtangosol.coherence.localhost=localhost"
COHERENCE_L_PORT="-Dtangosol.coherence.localport=8080"
COHERENCE_W_HOST1="-Dtangosol.coherence.wka.host.1=localhost"
COHERENCE_W_PORT1="-Dtangosol.coherence.wka.port.1=8085"
COHERENCE_W_HOST2="-Dtangosol.coherence.wka.host.2=localhost"
COHERENCE_W_PORT2="-Dtangosol.coherence.wka.port.2=8089"
COHERENCE_W_HOST3="-Dtangosol.coherence.wka.host.3=localhost"
COHERENCE_W_PORT3="-Dtangosol.coherence.wka.port.3=8090"
相关问题