jcs的服务器故障转移机制

时间:2018-06-21 10:12:15

标签: java spring jcs

服务器故障转移环境根据apache docs中提到的准则进行设置: enter link description here 链接-> https://commons.apache.org/proper/commons-jcs/RemoteAuxCache.html 当两个服务器都启动时,它运行良好,它从jcs提取数据并在管理控制台上显示缓存命中。  但是,如果主服务器无法启动,则必须在可用服务器或辅助服务器上工作。 在这种情况下,主服务器发生故障,然后辅助服务器无法从jcs中选择匹配项

以下是故障堆栈跟踪:

  

12:42:32.748 [main]信息   org.apache.commons.jcs.auxiliary.remote.RemoteCacheManager-查找   服务器   [//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-服务器   发现:   代理[IRemoteCacheServer,RemoteObjectInvocationHandler [UnicastRef   [liveRef:   [端点:192.168.56.1:5555,objID:[-55e49f52:1641ca4a40a:-7fff,   -6827216959955041134]]]]] 12:42:32.783 [main]调试org.apache.commons.jcs.auxiliary.remote.RemoteCacheManager-远程   服务=   代理[IRemoteCacheServer,RemoteObjectInvocationHandler [UnicastRef   [liveRef:   [端点:192.168.56.1:5555,objID:[-55e49f52:1641ca4a40a:-7fff,   -6827216959955041134]]]]] 12:42:32.785 [main]调试org.apache.commons.jcs.auxiliary.remote.AbstractRemoteCacheNoWaitFacade   -构建没有等待的外观12:42:32.785 [main]信息org.apache.commons.jcs.engine.control.CompositeCacheConfigurator-   解析的区域[测试] 12:42:32.785 [主要]信息   org.apache.commons.jcs.engine.control.CompositeCacheManager-已完成   1513毫秒内完成配置。 12:42:32.785 [main]调试   org.apache.commons.jcs.engine.control.CompositeCacheManager-attr = [   IS_LATERAL = true,IS_SPOOL = true,IS_REMOTE = true,IS_ETERNAL =   true,MaxLifeSeconds = -1,IdleTime = -1,CreateTime = 1529565152785,   LastAccessTime = 1529565151277,getTimeToLiveSeconds()= -1,   createTime = 1529565152785] 12:42:32.789 [main]调试   org.apache.commons.jcs.engine.control.CompositeCache-获取:key =   春天,localOnly =假12:42:32.789 [main]调试   org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache   -测试:获取钥匙弹簧零件12:42:32.789 [main]调试org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache   -测试:LRUMemoryCache错过了春季12:42:32.789 [main]调试org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache   -verifycache [test]:map包含0个元素,链接列表包含0个元素12:42:32.789 [main] DEBUG   org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache   -verifycache:通过键12:42:32.789检查链接列表[main]调试org.apache.commons.jcs.utils.struct.DoubleLinkedList-首先返回   节点12:42:32.789 [main]调试   org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache   -verifycache:按值12:42:32.789检查链表[main]调试org.apache.commons.jcs.utils.struct.DoubleLinkedList-返回   第一节点12:42:32.789 [main]调试   org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache   -verifycache:通过键集检查! 12:42:32.790 [main]调试org.apache.commons.jcs.engine.control.CompositeCache-尝试   从aux [test]中获取,其类型为:REMOTE_CACHE 12:42:32.791 [main]   调试   org.apache.commons.jcs.auxiliary.remote.AbstractRemoteCacheListener-   get listenerId = [0] 12:42:32.791 [main]调试   org.apache.commons.jcs.auxiliary.remote.AbstractRemoteAuxiliaryCache-   get listenerId = 0 12:42:32.791 [main]调试   org.apache.commons.jcs.auxiliary.remote.AbstractRemoteCacheListener-   get listenerId = [0] 12:42:32.791 [main]调试   org.apache.commons.jcs.engine.control.CompositeCache-得到了   CacheElement:空12:42:32.791 [main]调试   org.apache.commons.jcs.engine.control.CompositeCache-测试-小姐


我们可以看到辅助服务器5555已启动,但没有命中jcs,并且错过了jcs中存在的密钥

0 个答案:

没有答案