我设置了repcache(memcached-1.2.8-repcached-2.2.1)。 我通过telnet测试了两个复制的服务器(添加一个值并从其他节点检索它)。有效。
但是,当我尝试通过 spymemcach cleint将其缓存在我的java应用程序中时,它会抛出异常。
2014-08-16 14:51:05.938 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=/192.168.0.1:22122, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2014-08-16 14:51:05.944 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@52cc8049
Exception in thread "Thread-1" java.lang.RuntimeException: Timed out waiting for operation
at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:59)
at net.spy.memcached.internal.OperationFuture.getStatus(OperationFuture.java:101)
at com.test.RepCacheTest.cacheObject(RepCacheTest.java:118)
at com.test.RepCacheTest$1.run(RepCacheTest.java:60)
at java.lang.Thread.run(Thread.java:745)
Caused by: net.spy.memcached.internal.CheckedOperationTimeoutException: Timed out waiting for operation - failing node: /192.168.0.1:22122
at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:73)
at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:56)
... 4 more
我使用spymemcached-2.10.3.jar`客户端。 (并尝试用2.7 jar进行测试。但同样抛出异常)
一个repcache在我的主机操作系统上运行(ip:192.168.0.1和repcache端口22122.其他运行在我的虚拟盒Guest OS(192.168.0.1)中。但是,我可以使用telnet测试repcache复制并且它们运行良好在telnet。我的缓存值只有3或4个字符大小的蜇。但是我可以缓存到直接memcached
,并且它有效。
任何人都让我知道我的问题在哪里?