3 Replies Latest reply on Jul 1, 2013 9:00 AM by Martin Gencur

    Cache data seems invalid/corrupted when reading via memcached endpoint

    fjans Newbie

      Hi all,


      I'm using infinispan-server-5.3.0.CR2 from different client interfaces (Java and c++) so I'm required to use both hotrod and memcached endpoints.

      I was recently advised to use the <compatibility enabled="true"/> and it helped to share my cache data across endpoints.


      There are still some issues however.


      If I insert the following cache entry from java using hotrod:


          RemoteCacheManager rcm = new RemoteCacheManager("devhost:11222");

          RemoteCache rc = rcm.getCache("memcachedCache");



      Then I can show the key via the REST interface without problems:


      bash-3.00$ telnet devhost 8080


      Connected to devhost.

      Escape character is '^]'.

      GET /rest/memcachedCache/hotrod HTTP/1.0


      HTTP/1.1 200 OK

      Server: Apache-Coyote/1.1

      Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT

      Content-Type: text/plain

      Content-Length: 12

      Date: Mon, 24 Jun 2013 20:08:42 GMT

      Connection: close




      However if I try the same using the memcached interface I seem to get some junk or header or other binary data before the actual value:


      bash-3.00$ telnet devhost 11211


      Connected to devhost.

      Escape character is '^]'.

      get hotrod

      VALUE hotrod 0 19





      Is there something wrong with the memcached interface or do I need some other configuration?


      If you require more background information please check this thread where I got the tip to enabled compatibility mode: https://community.jboss.org/thread/229675