1

我们的环境如下:

CPE:2台服务器
ICN:2台服务器
应用服务器:WAS 8.5.5 Base

内容引擎和导航器都使用负载均衡器配置为高可用性。但是,如果ICN 1连接到CPE1并且CPE1已关闭,那么即使CPE的负载均衡器指向CPE2,Navigator 也无法连接到CPE2

日志如下:

javax.naming.NamingException: NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
    Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
    Context method: lookupExt
    Context name: HDOSYS0202Node01Cell/nodes/HDOSYS0202Node01/servers/server1
    Target name: FileNet/Engine,10.39.128.66:2809/FileNet/Engine
    Other data: 
    Exception stack trace: javax.naming.NamingException: Error during resolve [Root exception is org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: IBM minor code: E07 completed: No]
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1867)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1776)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1433)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:615)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
    Caused by: org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: IBM minor code: E07 completed: No

    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:412)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:271)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:258)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:376)
    at java.net.Socket.connect(Socket.java:546)
    at com.ibm.ws.orbimpl.transport.WSTCPTransportConnection.createSocket(WSTCPTransportConnection.java:370)
    at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:366)
    at com.ibm.ws.orbimpl.transport.WSTransport.getConnection(WSTransport.java:437)
    at com.ibm.CORBA.transport.TransportBase.getConnection(TransportBase.java:188)
    at com.ibm.rmi.iiop.TransportManager.get(TransportManager.java:100)
    at com.ibm.rmi.iiop.GIOPImpl.getConnection(GIOPImpl.java:134)
    at com.ibm.rmi.iiop.GIOPImpl.createRequest(GIOPImpl.java:178)
    at com.ibm.rmi.corba.ClientDelegate._createRequest(ClientDelegate.java:2010)
    at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1186)
    at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1272)
4

3 回答 3

2

Content Platform Engine 不支持故障转移所需的会话复制。建立连接后,客户端将绑定到特定端点,因此 corbaloc 和负载平衡别名都无济于事。如果节点不在集群中,则对等点将不在 JNDI 树中,因此彼此不了解。您所拥有的称为“stovepipe”配置。您可以对前端进行负载平衡,但每个前端都会与特定的后端通信,因此可用性不高。您可以将 CE 置于硬件负载平衡器 (SNAT) 之后,但它仍然缺少故障转移。CPE 将在 JBOSS 上运行,但 ICN 不会,因此要获得高可用性,您需要部署到 WebSphere ND 或 Weblogic。

于 2016-06-17T20:55:13.557 回答
0

你能分享用于建立CPE连接的URI吗?

当通过应用程序服务器集群配置使 Content Platform Engine 具有高可用性时,Content Platform Engine URI 应该具有以下形式(没有回车):

corbaloc::node1_hostname:BOOTSTRAP_ADDRESS,:node2_hostname:BOOTSTRAP_ADDRESS/cell/clusters/your_websphere_cluster_name/FileNet/Engine

例子:

corbaloc::testnode1:9810,:testnode2:9810/cell/clusters/testwascluster/FileNet/Engine

除了节点名称之外,此配置还需要 WebSphere 集群名称作为 URI 的一部分。集群配置的引导端口(默认为端口 9810)通常不同于非集群(独立)配置的引导端口(默认为端口 2809)。

无论 SSL 使用如何,都只使用一个 URI。如果启用了 EJB 安全性,则会自动建立基于 SSL 的 WebSphere EJB。

于 2016-06-10T08:52:01.290 回答
-2

我找到了一个包含代码的链接来解决我的问题。唯一的问题是如何为 Content Navigator 实现此代码

“这可能会有所帮助。我最近编写了一个 EJB 打印应用程序,我公司的其他应用程序使用它来生成可打印文档。我还在客户端上使用访问 bean 来远程调用我的 EJB。客户端是一个 4 服务器集群,我的EJB是一个2服务器集群。如果我在调用时停止运行我的EJB的应用程序服务器而不重新启动客户端,我也遇到了“连接被拒绝”异常的问题。这是我到目前为止所做的解决问题。

查看访问 bean,在创建实例后,当您调用远程方法(无论是什么,在我的情况下是 renderDocuments(),我将在下面的示例中使用)时,访问 bean 执行以下操作:"

public DocumentRenderOutputContext renderDocuments
    DocumentRequestList documentRequestList)
{
    try
    {
        instantiateEJB();
        return ejbRef().renderDocuments
            documentRequestList);
    }
    catch (NamingException ne)
    {
throw new DocumentRenderException(ne);
    }
    catch (CreateException ce)
    {
throw new DocumentRenderException(ce);
    }
    catch (RemoteException re)
    {
        THE EXCEPTION THROWN WHEN THE APP SERVER IS
        BROUGHT DOWN WITHOUT RESTARTING THE CLIENT
        WILL BE CAUGHT HERE
    }
}

If you bring down your EJB app server(s) without re-starting the client, the remote exception above will catch the "connect refused" exception.

So what i do inside the remote exception catch is the following:

try
{
    //see below for methods
    reset(); 
    return retryRenderDocuments(documentRequestList);
}
catch (NamingException ne)
{
    throw new DocumentRenderException(ne);
}
catch (CreateException ce)
{
    throw new DocumentRenderException(ce);
}
catch (RemoteException remote)
{
    throw new DocumentRenderException(re);
}

private void reset() throws NamingException
{   
    resetHomeCache();
    resetEJBRef();
}

private DocumentRenderOutputContext retryRenderDocuments
    DocumentRequestList documentRequestList)
    throws
    RemoteException,
    NamingException,
    CreateException,
    DocumentRenderException
{
    DocumentRenderOutputContext outputContext = null;

    Properties properties = new Properties();

    properties.put(
        javax.naming.Context.PROVIDER_URL,
getInit_NameServiceURLName()); //im assuming youve
properties.put(
PROPS.JNDI_CACHE_OBJECT,
PROPS.JNDI_CACHE_OBJECT_CLEARED);
InitialContext initialContext = new InitialContext(properties);

Object object = initialContext.lookup(getInit_JNDIName());

ECommercePrintHome homeRef = (ECommercePrintHome) object;

ECommercePrint printEngine = homeRef.create();

outputContext = printEngine.renderDocuments(documentRequestList);

return outputContext;
}

参考:- http://www.theserverside.com/discussions/thread.tss?thread_id=31495

于 2016-06-13T05:49:43.227 回答