Hi,

Which versions of elasticsearch / elasticsearch-transport-memcached / 
memcached are you using?

It looks like the memcached client is trying to execute a 0x02 ADD command 
whereas the elasticsearch-transport-memcached only supports 
get/set/delete/quit commands and disconnects for all others (see 
documentation here: 
https://github.com/elasticsearch/elasticsearch-transport-memcached) 

You may try a "set" instead.

-- Tanguy

Le mercredi 1 octobre 2014 15:35:40 UTC+2, Ryan Bergman a écrit :
>
> Hi,
>    I've been trying to play with Elasticsearch as a drop in replacement 
> for Memcached. I've installed the memcached transport and it looks like it 
> started fine and is on the right port. However if I attempt to use the java 
> spy.memcahed client library I'm not able to cache things.
>
> Instead I get errors like:
>
> 2014-10-01 08:22:31.579 INFO net.spy.memcached.MemcachedConnection:  Added 
> {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, 
> topWop=null, toWrite=0, interested=0} to connect queue
> 2014-10-01 08:22:31.586 INFO net.spy.memcached.MemcachedConnection: 
>  Connection state changed for sun.nio.ch.SelectionKeyImpl@76fb509a
> 2014-10-01 08:22:31.679 INFO net.spy.memcached.MemcachedConnection: 
>  Reconnecting due to exception on {QA sa=localhost/127.0.0.1:11211, 
> #Rops=2, #Wops=0, #iq=0, topRop=Cmd: 2 Opaque: 2 Key: foo Cas: 0 Exp: 1000 
> Flags: 0 Data Length: 3, topWop=null, toWrite=0, interested=1}
> java.io.IOException: Disconnected unexpected, will reconnect. 
>
> over and over.
>
> On the Elasticsearch side I get an error of
> [2014-10-01 08:22:31,675][ERROR][memcached.netty          ] [Living Hulk] 
> Unsupported opcode [0x2], ignoring and closing connection
>
> Here is my client configuration:
> ConnectionFactoryBuilder factory =  new ConnectionFactoryBuilder();
>         factory.setProtocol(ConnectionFactoryBuilder.Protocol.BINARY);
>         SerializingTranscoder t = new SerializingTranscoder(1000000);
>         t.setCompressionThreshold(1024);
>         factory.setTranscoder(t);
>         factory.setOpTimeout(1000);
>         factory.setTimeoutExceptionThreshold(1998);
>         factory.setHashAlg(DefaultHashAlgorithm.KETAMA_HASH);
>         
> factory.setLocatorType(ConnectionFactoryBuilder.Locator.CONSISTENT);
>         factory.setFailureMode(FailureMode.Redistribute);
>         factory.setUseNagleAlgorithm(false);
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/139a935a-fbc5-48fa-ab33-1a4c0cde4397%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to