13 Replies Latest reply on Oct 20, 2010 12:02 PM by galder.zamarreno

    InvalidResponseException "Invalid magic number" while using hotrod client

    sellhorn

      OK, this is what I'm trying to do;

       

      http://sellmic.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=8059&g2_serialNumber=2

      Right now I have 2 processes on the "bottom" part. One is a hotrod server with parameters;

      startServer.sh -r hotrod -c infinispan-config.xml

       

      The other is a little tester using infinispan with a cache manager using infinispan-config.xml. All it does it it puts a random number every second and a half with key "test".

       

      This is the content of infinispan-config.xml

       

      <infinispan>

        <global>

          <transport clusterName="test-cluster"/>

        </global>

        <default>

          <clustering mode="replication" />

        </default>

      </infinispan>

       

        <global>
          <transport clusterName="asellhorn"/>
        </global>
        <default>
          <clustering mode="replication" />
        </default>
      </infinispan>

      I start my hotrod server first, then the process putting values in "test" and I can see from getMembers() that there are two nodes connected in the cluster. Everything works fine.

       

      The problem is when I start a remote cache (it's in the same machine for now btw). I set it to connect to 127.0.0.1 and do 2 things, read the "key" value and put another value into the cache via the "put()" method.

       

      In the get() I get null. Then when I do a put with another key value I get the following;

       

      HotRodServerException{messageId=0, errorStatusCode=0} org.infinispan.client.hotrod.exceptions.InvalidResponseException: Invalid magic number. Expected a1 and received 2e

              at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:84)

              at org.infinispan.client.hotrod.impl.operations.AbstractKeyOperation.sendKeyOperation(AbstractKeyOperation.java:48)

              at org.infinispan.client.hotrod.impl.operations.GetOperation.executeOperation(GetOperation.java:26)

              at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:38)

              at org.infinispan.client.hotrod.impl.RemoteCacheImpl.get(RemoteCacheImpl.java:283)

       

      If I just start hotrod and then my remoteclient, things work fine. It's when I have that other node join the cluster that I get this error. What am I doing wrong? Isn't it possible to have a regular infinispan cluster on one end, and just have remote clients get (and put) values remotely via a hotrod server?