vaseems / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
0 stars 0 forks source link

xmemcached gets #185

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
我使用xmemcached gets 方法的时候总是报错 :

Caused by: net.rubyeye.xmemcached.exception.UnknownCommandException: Response 
error,error message:Unknow command GETS_ONE
    at net.rubyeye.xmemcached.command.Command.decodeError(Command.java:244)
    at net.rubyeye.xmemcached.command.Command.decodeError(Command.java:270)
    at net.rubyeye.xmemcached.command.text.TextGetCommand.decode(TextGetCommand.java:126)
    at net.rubyeye.xmemcached.codec.MemcachedDecoder.decode0(MemcachedDecoder.java:61)
    at net.rubyeye.xmemcached.codec.MemcachedDecoder.decode(MemcachedDecoder.java:56)
    at com.google.code.yanf4j.nio.impl.NioTCPSession.decode(NioTCPSession.java:288)
    at com.google.code.yanf4j.nio.impl.NioTCPSession.readFromBuffer(NioTCPSession.java:205)
    at com.google.code.yanf4j.nio.impl.AbstractNioSession.onRead(AbstractNioSession.java:198)
    at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:343)
    at com.google.code.yanf4j.nio.impl.SocketChannelController.dispatchReadEvent(SocketChannelController.java:56)
    at com.google.code.yanf4j.nio.impl.NioController.onRead(NioController.java:157)
    at com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:294)
    at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:141)
请大家指点一下,到底什么问题??? 
我用的是xmemcached-1.3.5.jar 看了源码 commandType里有gets_one的啊 
我用windows环境开发测试的

Original issue reported on code.google.com by zhoulei9...@gmail.com on 19 Mar 2012 at 8:19

GoogleCodeExporter commented 9 years ago
请给一个测试的例子吧,让我重现下。

Original comment by killme2...@gmail.com on 19 Mar 2012 at 8:27

GoogleCodeExporter commented 9 years ago
请给一个测试的例子吧,让我重现下。

Original comment by killme2...@gmail.com on 19 Mar 2012 at 8:27

GoogleCodeExporter commented 9 years ago
嗯 我就是很简单的测试 是这样的
MemcachedClientBuilder bcb = new 
XMemcachedClientBuilder(AddrUtil.getAddresses("localhost:11211"));
MemcachedClient mc = bcb.build();
mc.set("a",  0 ,  1 );  // 设置a为1 
GetsResponse<Integer> result  =  mc.gets( "a" );

Original comment by zhoulei9...@gmail.com on 19 Mar 2012 at 8:32

GoogleCodeExporter commented 9 years ago
我测试是没有问题的,你确认你的memcached版本支持gets协议。�
��果你用的是非官方的windows移植版本可能是不支持的。

Original comment by killme2...@gmail.com on 19 Mar 2012 at 8:37

GoogleCodeExporter commented 9 years ago
我安装用的是xmemcached-1.1.2-win32 
这个问题属于memcached的服务器端没有这个命令吗?

Original comment by zhoulei9...@gmail.com on 19 Mar 2012 at 8:39

GoogleCodeExporter commented 9 years ago
哪里有xmemcached-1.1.2-win32,多了个x吧。
这个不是官方版本,我估计是不支持的。

Original comment by killme2...@gmail.com on 19 Mar 2012 at 8:48

GoogleCodeExporter commented 9 years ago
很简单,你可以telnet上去gets测试下。

Original comment by killme2...@gmail.com on 19 Mar 2012 at 8:48

GoogleCodeExporter commented 9 years ago
嗯 好的 我试一下 谢谢

Original comment by zhoulei9...@gmail.com on 19 Mar 2012 at 8:52

GoogleCodeExporter commented 9 years ago
我关闭这个issue了,建议你用官方的,在虚拟机上跑一台,或
者你们有独立部署的linux服务器做测试。

Original comment by killme2...@gmail.com on 19 Mar 2012 at 9:49