2 Replies Latest reply on Sep 30, 2010 4:09 AM by Galder Zamarreño

    Problem with Hotrod server

    Nikolay Tsankov Newbie

      We are running a cache cluster using the hotrod server and connecting to it with the java hotrod client.

      We had the following problem:

       

      Client was running fine at the beginning and started getting errors after some time:

       

      Exception in thread "main" HotRodServerException{messageId=0, errorStatusCode=0} org.infinispan.client.hotrod.exceptions.InvalidResponseException: Invalid magic number. Expected a1 and received 50

      While on the server the following error was logged:

       

       

      ERROR [org.infinispan.server.core.AbstractProtocolDecoder$] (HotRodServerWorker-1-1) Exception reported
                java.lang.NullPointerException
                at org.infinispan.server.hotrod.HotRodEncoder.getTopologyResponse(HotRodEncoder.scala:84)
                at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.scala:32)
      ...

       

      This error was traced to be caused by having an expiration setting on the default cache in our config, which is apparently used by hotrod server for its topology cache, so the "view" entry expired after 30 seconds and caused this NPE on the server. Which in turn caused an invalid or no header to be written to the response and the resulting error on the client.

       

      Work around was to create a "namedCache" and configure the expiration on it.

       

      Version 4.1.0-Final