5 Replies Latest reply on Mar 28, 2012 12:07 PM by chavarao

    Infinispan - hotrod cluster issue?

    chavarao

      Hi,

      I have setup a cluster with two hot rod servers on two different machines.

       

      I have a my client running and my dao loads from db and put in cache some reason the cache is getting clear

      and reloading from db. I think messages are sent from one server to another causing stale data?

      When I run one hot rod server without clustering , it only loads one time from db.It works great.

       

      Is there configuration  issue? 

       

      Thanks

      Chava

        • 1. Re: Infinispan - hotrod cluster issue?
          galder.zamarreno

          What's the server config? And Infinispan version?

          • 2. Re: Infinispan - hotrod cluster issue?
            chavarao

            infinispan-5.1.2 .  I am starting up server using command .

             

            startServer.sh -r hotrod -p 11222 -l machine1 -c cluster.xml

             

             

            see attached hot-rod-client  and server config files

             

            Server config. this is save in file cluster.xml

             

            <?xml version="1.0" encoding="UTF-8"?>
            <infinispan>
                <global>
                    <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport">
                        <properties>
                            <property name="configurationFile" value="jgroups-udp.xml"/>
                        </properties>
                    </transport>
                </global>

                <default>
                    <clustering mode="distribution">
                        <sync/>
                        <hash rehashEnabled="true" numOwners="2" rehashWait="120000" rehashRpcTimeout="600000"/>
                        <l1 enabled="false" lifespan="600000"/>
                    </clustering>
                </default>

                <namedCache name="distributedCache">
                    <clustering mode="distribution">
                        <sync/>
                        <hash rehashEnabled="true" numOwners="2" rehashWait="120000" rehashRpcTimeout="600000"/>
                        <l1 enabled="false" lifespan="600000"/>
                    </clustering>
                </namedCache>

                <namedCache name="test">
                    <clustering mode="distributedCache">
                        <!--  Defines whether to retrieve state on startup -->
                        <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
                        <!--  Network calls are synchronous. -->
                        <sync replTimeout="20000"/>
                    </clustering>
                </namedCache>
            </infinispan>

             

             

            Hot-rod-client properties

             

            #
            # JBoss, Home of Professional Open Source
            # Copyright 2009 Red Hat Inc. and/or its affiliates and other
            # contributors as indicated by the @author tags. All rights reserved.
            # See the copyright.txt in the distribution for a full listing of
            # individual contributors.
            #
            # This is free software; you can redistribute it and/or modify it
            # under the terms of the GNU Lesser General Public License as
            # published by the Free Software Foundation; either version 2.1 of
            # the License, or (at your option) any later version.
            #   ~
            # This software is distributed in the hope that it will be useful,
            # but WITHOUT ANY WARRANTY; without even the implied warranty of
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
            # Lesser General Public License for more details.
            #
            # You should have received a copy of the GNU Lesser General Public
            # License along with this software; if not, write to the Free
            # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
            # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
            #

            # hopefully this port is available
            infinispan.client.hotrod.transport_factory = org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory

             

            infinispan.client.hotrod.server_list = machine1:11222;machine2:11222
            infinispan.client.hotrod.marshaller = org.infinispan.marshall.jboss.GenericJBossMarshaller
            infinispan.client.hotrod.async_executor_factory = org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory
            infinispan.client.hotrod.default_executor_factory.pool_size = 1
            infinispan.client.hotrod.default_executor_factory.queue_size = 10000
            infinispan.client.hotrod.hash_function_impl.1 = org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV1
            infinispan.client.hotrod.tcp_no_delay = true
            infinispan.client.hotrod.ping_on_startup = true
            infinispan.client.hotrod.request_balancing_strategy = org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy
            infinispan.client.hotrod.key_size_estimate = 64
            infinispan.client.hotrod.value_size_estimate = 512
            infinispan.client.hotrod.force_return_values = false

            ## below is connection pooling config
            maxActive=99
            maxTotal = 98
            maxIdle = 97

             

            Using default jgroups-udp.xml from examples.

            • 3. Re: Infinispan - hotrod cluster issue?
              galder.zamarreno

              Not sure I understand the issue you have, but maybe the cluster is not being formed and when you land in a different node, the data is not there? See the logs to see if the cluster view encompassing both machines is formed. We need more info on the steps that you're doing to try to figure out what's wrong.

              • 4. Re: Infinispan - hotrod cluster issue?
                chavarao

                You are right, my issue is  infinispan running on two different machines are not forming cluster.

                 

                When I run two instances of infinispan  on the same machine with different ports. it works fine.

                 

                I didn't find any thing in log why its not forming cluster.? I found another forum  to research this.

                 

                 

                Thanks

                • 5. Re: Infinispan - hotrod cluster issue?
                  chavarao

                  Initially I was worried about  noticing comments like lack of documentation. I do beleive that there is a lot of documnetation there  and also this forum is so helpful.

                   

                  Thank you