我正在使用ehcache(2.10.1)和terracotta(开源4.3.1)实现分布式缓存。 我在一台机器上尝试了两个JVM实例和一个terracotta服务器,并且代码按预期工作,没有错误。

现在,我正在尝试在虚拟机上运行相同的terracotta服务器,但使用客户端。 在VM上运行客户端时,出现以下消息和错误:

2016-02-23 14:27:10,943 INFO TerracottaClient:209 - Thread [main] [cacheManager: no name]: Creating new ClusteredInstanceFactory

2016-02-23 14:27:10,954 WARN TerracottaClusteredInstanceHelper:148 - ehcache-terracotta jar is detected in the current classpath. The use of ehcache-terracotta jar is no longer needed in this version of Ehcache.

2016-02-23 14:27:11,241 INFO - Terracotta 4.3.1, as of 20151016-121959 (Revision 26592 from 4.3.1)

2016-02-23 14:27:12,177 INFO - Successfully loaded base configuration from server at 'A.B.C.D:9510'.

2016-02-23 14:27:12,222 INFO - Log file: '/root/terracotta/client-logs/terracotta-client.log'.

2016-02-23 14:27:18,202 INFO - Connection successfully established to server at A.B.C.D:9510

2016-02-23 14:27:24,731 INFO AnnotationSizeOfFilter:53 - Using regular expression provided through VM argument net.sf.ehcache.pool.sizeof.ignore.pattern for IgnoreSizeOf annotation : ^.*cache\..*IgnoreSizeOf$

Exception in thread "main" net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory. Initial cause was org.terracotta.toolkit.ToolkitInstantiationException: java.lang.RuntimeException: Unable to create toolkit.

at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:90)

at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:157)

at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:180)

at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:129)

at net.sf.ehcache.CacheManager.doInit(CacheManager.java:463)

at net.sf.ehcache.CacheManager.init(CacheManager.java:395)

at net.sf.ehcache.CacheManager.(CacheManager.java:295)

at com.cisco.dcextract.ExtractCache.main(ExtractCache.java:13)

使用的tc-config.xml文件:

c:\datacache

9510

9520

9530

true

2g

terracotta/server-logs

true

terracotta/client-logs

使用的ehcache.xml文件:

xsi:noNamespaceSchemaLocation="ehcache.xsd"

updateCheck="true" monitoring="autodetect">

maxElementsInMemory="10000"

eternal="false"

timeToIdleSeconds="120"

timeToLiveSeconds="120"

overflowToDisk="true"

diskSpoolBufferSizeMB="30"

diskPersistent="false"

diskExpiryThreadIntervalSeconds="120"

memoryStoreEvictionPolicy="LRU"

/>

maxElementsInMemory="1000000"

eternal="false"

overflowToDisk="false"

diskSpoolBufferSizeMB="20"

timeToIdleSeconds="100"

timeToLiveSeconds="100"

memoryStoreEvictionPolicy="LRU">

在客户端上运行程序时,我包括了terracotta-toolkit-runtime-4.3.1.jar和其他必需的jar。 我正在尝试调试错误。 错误的可能原因是什么?

日志文件内容(仅添加相关部分)

2016-02-25 15:37:28,852 [main] INFO com.terracottatech.console - Connection successfully established to server at 173.39.65.73:9510

2016-02-25 15:37:28,852 [WorkerThread(client_coordination_stage, 0)] INFO com.tc.object.RemoteServerMapManager - ClientID[6]: Sending outstanding servermap requests, num msgs: 0

2016-02-25 15:37:28,853 [main] INFO com.terracottatech.tsa - Connection successfully established to server at 173.39.65.73:9510

2016-02-25 15:37:28,853 [WorkerThread(client_coordination_stage, 0)] INFO com.tc.management.remote.protocol.terracotta.TunnelingEventHandler - Client JMX server ready; sending notification to L2 server

2016-02-25 15:37:28,853 [WorkerThread(client_coordination_stage, 0)] INFO com.tc.platform.rejoin.RejoinManagerImpl - This node joined the cluster - rejoinEnabled: false newNodeId: ClientID[6]

2016-02-25 15:37:28,855 [WorkerThread(client_coordination_stage, 0)] INFO com.tc.cluster.DsoClusterImpl - NODE_JOINED ClientID[6] rejoinHappened false

2016-02-25 15:37:33,417 [main] INFO com.tc.management.remote.protocol.terracotta.TunneledDomainManager - Sending current registered tunneled domains to L2 server to set up the tunneled connections for the mbeans that match.

2016-02-25 15:37:34,553 [L1 VM Shutdown Hook] INFO com.terracottatech.tsa - Running L1 VM shutdown hook

2016-02-25 15:37:34,553 [L1 VM Shutdown Hook] INFO com.terracottatech.tsa - shuting down Terracotta Client hook=true force=false

2016-02-25 15:37:34,553 [L1 VM Shutdown Hook] INFO com.terracotta.toolkit.factory.impl.ToolkitNotifierFactoryImpl - Shutting Down Notifier Thread Pool

2016-02-25 15:37:34,554 [CommonShutDownHook] INFO com.terracottatech.tsa - L1 Exiting...

2016-02-25 15:37:34,789 [L1 VM Shutdown Hook] INFO com.tc.object.tx.RemoteTransactionManagerImpl - ClientID[6]: stop(): took 0 millis to complete

2016-02-25 15:37:34,790 [L1 VM Shutdown Hook] INFO com.tc.net.protocol.transport.ConnectionHealthCheckerImpl: DSO Client - Connection to [dhcp-173-39-65-73.cisco.com:9510] CLOSED. Health Monitoring for this node is now disabled.

2016-02-25 15:37:34,790 [L1 VM Shutdown Hook] INFO com.tc.net.protocol.transport.ClientConnectionEstablisher - waiting for connection establisher to finish null

2016-02-25 15:37:34,790 [L1 VM Shutdown Hook] INFO com.tc.platform.rejoin.ClientChannelEventController - Got channel event - type: CHANNEL_CLOSED_EVENT, event: com.tc.net.protocol.tcm.ChannelEventImpl@1768481525[type = CHANNEL_CLOSED_EVENT, timestamp = Thu Feb 25 15:37:34 IST 2016, channel = ChannelID[NULL_ID, Status:CLOSED]:10.197.70.109:35582 173.39.65.73:9510 remote node : GroupID[0]

ehcach文件报错_java - 分布式缓存-Terracotta和Ehcache-客户端错误:无法创建工具包 - 堆栈内存溢出...相关推荐

  1. ieda ts文件报错_Java开发平台IntelliJ IDEA教程:开发,运行和调试TypeScript源代码-IntelliJ IDEA系列教程:-慧都网...

    Java开发平台开发,运行和调试TypeScript源代码 IntelliJ IDEA是Java语言开发的集成环境,IntelliJ在业界被公认为优秀的Java开发工具之一,尤其在智能代码助手.代码自 ...

  2. java hadoop2.6.0 读取文件报错_java 程序访问hdfs错误 hadoop2.2.0

    很奇怪的问题,程序在eclipse上跑没问题: 这就代码:FileSystem fs = FileSystem.get(URI.create(hdfs_file),  conf , "use ...

  3. c 怎么获取服务器文件是否存在,powershell - 需要找出服务器上是否存在特定的文件夹。如果是,那么哪个驱动器是C:或D - 堆栈内存溢出...

    我需要找出服务器上Backupeventlog存在名为Backupeventlog文件夹. 如果是,那么哪个驱动器为C:或D:驱动器. 此文件夹也为空,如果不为空,则此文件夹下创建的最新文件的日期是什 ...

  4. java slf4j日志级别_java - 在slf4j中设置运行时消息的日志级别 - 堆栈内存溢出

    ===============>>#1 票数:41 已采纳 使用slf4j无法做到这slf4j . 我想,缺少这个功能的原因是,几乎不可能为slf4j构建一个Level类型,它可以有效地映 ...

  5. java 解析数据包_java - 如何在Java中正确解析TCP数据包? - 堆栈内存溢出

    我目前有一个简单的TCP服务器,该服务器调用一个函数,并在每个新的传入数据包上以字节数组的形式将二进制TCP有效负载传递给它,解析它的正确方法是什么? 我试图通过将其切成不同的字节数组并分别进行处理来 ...

  6. java 获取组件大小_java - 如何初始化取决于组件大小的图像抓取? - 堆栈内存溢出...

    如果我正确理解问题,那么您的方法会有些落后. 与其让ImageNavigator告诉ZoomedImage绘制哪个子图像,不如让ZoomedImage在绘制时询问ImageNavigator(通过重写 ...

  7. java从端口接收数据_java - Java中通过串行端口接收数据的效率更高 - 堆栈内存溢出...

    这是代码片段 我在这里启动一个动作监听器 try { port_seleted.addEventListener(this); } catch (TooManyListenersException e ...

  8. java图片强绘制表情符号_java - 具有表情符号的Graphics2D.drawString()无法正常工作 - 堆栈内存溢出...

    如果我将代码打包为.jar而不是仅使用classpath,则无法正常工作(就像我在IDE中按"播放"一样) 当我使用IDE时,可以使用g2.drawString (使用Apple ...

  9. linux下编译make文件报错“/bin/bash^M: 坏的解释器,使用grep快速定位代码位置

    一.linux下编译make文件报错"/bin/bash^M: 坏的解释器 参考文章:http://blog.csdn.net/liuqiyao_01/article/details/415 ...

最新文章

  1. sql数据库打包部署安装
  2. node-webkit教程(16)调试typescript
  3. zhlan--Python中的字典遍历方法 字典取值
  4. include的两种形式、CPP的搜索路径
  5. Proguard源码分析(五) ConfigurationParser.keep参数
  6. DCGAN in Tensorflow生成动漫人物
  7. 7分钟理解JS的节流、防抖及使用场景
  8. centos Crontab
  9. mysql 写入随机字中文符_MySQL产生随机字符
  10. 是时候学习生成对抗网络了,李宏毅老师GAN视频教程下载
  11. centos6.5安装ansible和tower
  12. CISP 考试资源分享
  13. STM32F401CCU6移植华为LiteOS
  14. 服装尺寸 html,史上最完整的服装尺寸号型和换算知识
  15. 解决DNS解析故障的几种方法
  16. linux终端下如何分屏,ubuntu terminal 终端分屏
  17. 爱测未来移动-从Emmagee代码浅谈Android基础性能数据监控方法
  18. html图片纵向无缝滚动,HTML内容或图片无缝滚动技巧
  19. google map的简单应用-显示华南理工大学
  20. 计算机的喇叭接口显示的英文,电脑上喇叭图标不见了怎么找到(电脑不显示扬声器图标的解决方法)...

热门文章

  1. 关于兴趣、教育、敬业 与 职业道德 ——读 金旭亮、时寒冰博文有感
  2. 声明式UI是否会成为Android开发的主流?
  3. 03- 目标检测数据集和标注工具介绍 (目标检测)
  4. 简单的计算机琴谱,简单的电子琴儿歌简谱
  5. 静态模型一键动态化,教你如何集成动作捕捉能力
  6. MongoDB 练习
  7. ME860安装安卓电子市场(android market)
  8. 智能钢琴、MIDI音乐、打谱、曲谱乐谱播放识别SDK、音序器、合成器、播放器软件
  9. 大型网站技术架构:核心原理与案例分析——伸缩性
  10. java 压缩 算法_Java编程实现轨迹压缩之Douglas-Peucker算法详细代码