commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amol D (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCS-192) Failover Mechanism not working with Remote
Date Thu, 28 Jun 2018 10:32:00 GMT
Amol D created JCS-192:
--------------------------

             Summary: 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


Currently we are using RMI Remote caching and individually i can connect to both the servers
indiviadually for example  in client if i set 

jcs.auxiliary.RFailover.attributes.FailoverServers=127.0.0.1:5556

or 

jcs.auxiliary.RFailover.attributes.FailoverServers=127.0.0.1:5555

then caching works fine 

Further i connect my l client to both  the servers as below 

jcs.auxiliary.RFailover.attributes.FailoverServers=127.0.0.1:5556,127.0.0.1:5555 

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 on Failover server (127.0.0.1:5555)
however it is not happening . In case Primary goes down client gets a connection to secondary
server (127.0.0.1:5555)  is made as per below logs 

12:42:32.748 [main] INFO org.apache.commons.jcs.auxiliary.remote.RemoteCacheManager - Looking
up server [//127.0.0.1:5555/org.apache.commons.jcs.engine.behavior.ICacheServiceNonLocal]
12:42:32.783 [main] INFO org.apache.commons.jcs.auxiliary.remote.RemoteCacheManager - Server
found: Proxy[IRemoteCacheServer,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.56.1:5555](remote),objID:[-55e49f52:1641ca4a40a:-7fff,
-6827216959955041134]]]]]

However when 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 this 

Below is our configuration for Client , Primary Server and Secondary server

--------------------------------------------------------------------------------------------------

Client Configuration - ccf 

jcs.region.test=DC,RFailover
jcs.region.test.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
jcs.region.test.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.test.cacheattributes.MaxObjects=1000

jcs.region.test.elementattributes.IsSpool=false
jcs.region.test.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
 
jcs.auxiliary.RFailover=org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.FailoverServers=127.0.0.1:5556,127.0.0.1:5555
jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true
jcs.auxiliary.RFailover.attributes.GetOnly=false

--------------------------------------------------------------------------------------------------------------------------

 

Primary Server - ccf 

jcs.default=DC,RCluster1
jcs.default.cacheattributes=
 org.apache.commons.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000

registry.host=localhost
registry.port=5556
remote.cache.service.port=5556
remote.cache.rmiSocketFactoryTimeoutMillis=5000
remote.cluster.LocalClusterConsistency=true
remote.cluster.AllowClusterGet=true

jcs.auxiliary.RCluster1=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RCluster1.attributes=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RCluster1.attributes.RemoteTypeName=CLUSTER
jcs.auxiliary.RCluster1.attributes.RemoveUponRemotePut=false
jcs.auxiliary.RCluster1.attributes.ClusterServers=localhost:5555
jcs.auxiliary.RCluster1.attributes.GetOnly=false


# Remote RMI Cache set up to failover
jcs.auxiliary.RFailover=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.FailoverServers=
 localhost:5555,localhost:5556
jcs.auxiliary.RC.attributes.RemoveUponRemotePut=true
jcs.auxiliary.RFailover.attributes.GetOnly=false

--------------------------------------------------------------------------------------------------

Secondary Server ccf 

registry.host=localhost
registry.port=5555
# call back port to local caches.
remote.cache.service.port=5555
# rmi socket factory timeout
remote.cache.rmiSocketFactoryTimeoutMillis=5000
# cluster setting
remote.cluster.LocalClusterConsistency=true
remote.cluster.AllowClusterGet=true
# sets the default aux value for any non configured caches
jcs.default=DC,RCluster1
jcs.default.cacheattributes=
 org.apache.commons.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000

jcs.auxiliary.RCluster1=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RCluster1.attributes=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RCluster1.attributes.RemoteTypeName=CLUSTER
jcs.auxiliary.RCluster1.attributes.RemoveUponRemotePut=false
jcs.auxiliary.RCluster1.attributes.ClusterServers=localhost:5556
jcs.auxiliary.RCluster1.attributes.GetOnly=false
 # Remote RMI Cache set up to failover
jcs.auxiliary.RFailover=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=
 org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.FailoverServers=
 localhost:5555,localhost:5556
jcs.auxiliary.RC.attributes.RemoveUponRemotePut=true
jcs.auxiliary.RFailover.attributes.GetOnly=false

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message