From issues-return-68468-archive-asf-public=cust-asf.ponee.io@commons.apache.org Thu Jun 28 12:35:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0E590180662 for ; Thu, 28 Jun 2018 12:35:05 +0200 (CEST) Received: (qmail 18045 invoked by uid 500); 28 Jun 2018 10:35:05 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 18034 invoked by uid 99); 28 Jun 2018 10:35:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2018 10:35:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3755B1A3F8A for ; Thu, 28 Jun 2018 10:35:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id IKsSw8vJ5o7c for ; Thu, 28 Jun 2018 10:35:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C9E2D5F4A2 for ; Thu, 28 Jun 2018 10:35:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DEE91E015A for ; Thu, 28 Jun 2018 10:35:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7537623F85 for ; Thu, 28 Jun 2018 10:35:00 +0000 (UTC) Date: Thu, 28 Jun 2018 10:35:00 +0000 (UTC) From: "Amol D (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (JCS-192) Failover Mechanism not working with Remote MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCS-192?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:all-tabpanel ] Amol D updated JCS-192: ----------------------- Attachment: StackTrace.txt > Failover Mechanism not working with Remote > ------------------------------------------ > > Key: JCS-192 > URL: https://issues.apache.org/jira/browse/JCS-192 > Project: Commons JCS > Issue Type: Bug > Components: RMI Remote Cache > Affects Versions: jcs-2.2 > Reporter: Amol D > Priority: Critical > Attachments: StackTrace.txt > > > Currently we are using RMI Remote caching and individually i can connect = to both the servers indiviadually for example=C2=A0 in=C2=A0client if i set= =C2=A0 > jcs.auxiliary.RFailover.attributes.FailoverServers=3D127.0.0.1:5556 > or=C2=A0 > jcs.auxiliary.RFailover.attributes.FailoverServers=3D127.0.0.1:5555 > then caching works fine=C2=A0 > Further i connect my l client to both=C2=A0 the servers=C2=A0as below=C2= =A0 > jcs.auxiliary.RFailover.attributes.FailoverServers=3D127.0.0.1:5556,127.0= .0.1:5555=C2=A0 > In this case whenever i cache it always gets added to Primary Server (127= .0.0.1:5556) and in case Primary server goes down Caching should be based o= n Failover server (127.0.0.1:5555) however it is not happening . In case Pr= imary goes down client gets a connection to secondary server (127.0.0.1:555= 5)=C2=A0 is made as per below logs=C2=A0 > 12:42:32.748 [main] INFO org.apache.commons.jcs.auxiliary.remote.RemoteCa= cheManager - Looking up server [//127.0.0.1:5555/org.apache.commons.jcs.eng= ine.behavior.ICacheServiceNonLocal] 12:42:32.783 [main] INFO org.apache.com= mons.jcs.auxiliary.remote.RemoteCacheManager - Server found: Proxy[IRemoteC= acheServer,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[19= 2.168.56.1:5555](remote),objID:[-55e49f52:1641ca4a40a:-7fff, -6827216959955= 041134]]]]] > However=C2=A0when i add a new element to JCS Cache in this case it is not= reflected so failover seems to be not working please provide a fix for thi= s=C2=A0 > Below is our=C2=A0configuration for Client , Primary Server and Secondary= server > -------------------------------------------------------------------------= ------------------------- > Client Configuration - ccf=C2=A0 > jcs.region.test=3DDC,RFailover > jcs.region.test.cacheattributes=3Dorg.apache.commons.jcs.engine.Composite= CacheAttributes > jcs.region.test.cacheattributes.MemoryCacheName=3Dorg.apache.commons.jcs.= engine.memory.lru.LRUMemoryCache > jcs.region.test.cacheattributes.MaxObjects=3D1000 > jcs.region.test.elementattributes.IsSpool=3Dfalse > jcs.region.test.elementattributes=3Dorg.apache.commons.jcs.engine.Element= Attributes > =20 > jcs.auxiliary.RFailover=3Dorg.apache.commons.jcs.auxiliary.remote.RemoteC= acheFactory > jcs.auxiliary.RFailover.attributes=3Dorg.apache.commons.jcs.auxiliary.rem= ote.RemoteCacheAttributes > jcs.auxiliary.RFailover.attributes.FailoverServers=3D127.0.0.1:5556,127.0= .0.1:5555 > jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=3Dtrue > jcs.auxiliary.RFailover.attributes.GetOnly=3Dfalse > -------------------------------------------------------------------------= ------------------------------------------------- > =C2=A0 > Primary Server - ccf=C2=A0 > jcs.default=3DDC,RCluster1 > jcs.default.cacheattributes=3D > org.apache.commons.jcs.engine.CompositeCacheAttributes > jcs.default.cacheattributes.MaxObjects=3D1000 > registry.host=3Dlocalhost > registry.port=3D5556 > remote.cache.service.port=3D5556 > remote.cache.rmiSocketFactoryTimeoutMillis=3D5000 > remote.cluster.LocalClusterConsistency=3Dtrue > remote.cluster.AllowClusterGet=3Dtrue > jcs.auxiliary.RCluster1=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory > jcs.auxiliary.RCluster1.attributes=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes > jcs.auxiliary.RCluster1.attributes.RemoteTypeName=3DCLUSTER > jcs.auxiliary.RCluster1.attributes.RemoveUponRemotePut=3Dfalse > jcs.auxiliary.RCluster1.attributes.ClusterServers=3Dlocalhost:5555 > jcs.auxiliary.RCluster1.attributes.GetOnly=3Dfalse > # Remote RMI Cache set up to failover > jcs.auxiliary.RFailover=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory > jcs.auxiliary.RFailover.attributes=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes > jcs.auxiliary.RFailover.attributes.FailoverServers=3D > localhost:5555,localhost:5556 > jcs.auxiliary.RC.attributes.RemoveUponRemotePut=3Dtrue > jcs.auxiliary.RFailover.attributes.GetOnly=3Dfalse > -------------------------------------------------------------------------= ------------------------- > Secondary Server ccf=C2=A0 > registry.host=3Dlocalhost > registry.port=3D5555 > # call back port to local caches. > remote.cache.service.port=3D5555 > # rmi socket factory timeout > remote.cache.rmiSocketFactoryTimeoutMillis=3D5000 > # cluster setting > remote.cluster.LocalClusterConsistency=3Dtrue > remote.cluster.AllowClusterGet=3Dtrue > # sets the default aux value for any non configured caches > jcs.default=3DDC,RCluster1 > jcs.default.cacheattributes=3D > org.apache.commons.jcs.engine.CompositeCacheAttributes > jcs.default.cacheattributes.MaxObjects=3D1000 > jcs.auxiliary.RCluster1=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory > jcs.auxiliary.RCluster1.attributes=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes > jcs.auxiliary.RCluster1.attributes.RemoteTypeName=3DCLUSTER > jcs.auxiliary.RCluster1.attributes.RemoveUponRemotePut=3Dfalse > jcs.auxiliary.RCluster1.attributes.ClusterServers=3Dlocalhost:5556 > jcs.auxiliary.RCluster1.attributes.GetOnly=3Dfalse > # Remote RMI Cache set up to failover > jcs.auxiliary.RFailover=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory > jcs.auxiliary.RFailover.attributes=3D > org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes > jcs.auxiliary.RFailover.attributes.FailoverServers=3D > localhost:5555,localhost:5556 > jcs.auxiliary.RC.attributes.RemoveUponRemotePut=3Dtrue > jcs.auxiliary.RFailover.attributes.GetOnly=3Dfalse > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)