7 Replies Latest reply on Jul 14, 2010 3:42 AM by galder.zamarreno

    Deploying an infinispan node on a linux machine

    infini8

      Hi,

      I tried deploying an infinispan node on a linux machine. Following was the code and configuration:

       

      Code:

       

       

       

      CacheManager cacheManager = new DefaultCacheManager("gui-demo-cache-config.xml");
      Cache cache = cacheManager.getCache();
      cache.put("key1", 0.1F);

       

      Configuration:

       

       

      <infinispan

            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

            xsi:schemaLocation="urn:infinispan:config:4.0 http://www.infinispan.org/schemas/infinispan-config-4.0.xsd"

            xmlns="urn:infinispan:config:4.0">

         <global>

            <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="demoCluster">    

            </transport>

         </global>

         <default name="defaultCache">

            <clustering mode="distribution">

               <l1 enabled="false" lifespan="600000"/>

               <hash numOwners="2" rehashRpcTimeout="120000"/>

               <sync/>

            </clustering>

         </default>

      </infinispan>

       

      After deploying, I get the following console o/p:

      Jun 29, 2010 5:49:05 PM org.infinispan.remoting.transport.jgroups.JGroupsTranspo
      rt start

      ....

      Jun 29, 2010 5:49:05 PM org.jgroups.logging.JDKLogImpl warn
      WARNING: the type of the stack (IPv6) and the user supplied addresses (IPv4) don
      't match: /228.6.7.8.
      Use system props java.net.preferIPv4Stack or java.net.preferIPv6Addresses to pic
      k the correct stack
      Jun 29, 2010 5:49:05 PM org.jgroups.logging.JDKLogImpl warn
      WARNING: could not bind to /228.6.7.8 (IPv4 address); make sure your mcast_addr
      is of the same type as the preferred IP stack (IPv4 or IPv6) by checking the val
      ue of the system properties java.net.preferIPv4Stack and java.net.preferIPv6Addr
      esses.

      ...

      INFO: Infinispan version: Infinispan 'Starobrno' 4.0.0.FINAL

       

       

      Multiple nodes on linux machines having the same cluster name, are not able to connect to each other.

      While, the same jars run on multiple Windows machines are able to connect.

      How do I get rid of this?

       

      Thanks in advance,

        • 1. Re: Deploying an infinispan node on a linux machine
          mircea.markus

          try adding -Djava.net.preferIPv4Stack=true to the java process.

          1 of 1 people found this helpful
          • 2. Re: Deploying an infinispan node on a linux machine
            infini8

            I had tried that, but to no effect.

             

            When I run an infinispan node each on two separate Linux machines, they both detect each other but throw the following Warnings

            Hence, no load balancing/replication:

             

            WARNING: pineapple-43108: dropped message from company06-23111 (not in xmit_table), keys are [pineapple-43108], view=[pineapple-43108|0] [pineapple-43108]
            cacheKeys = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]
            Jul 1, 2010 5:03:42 PM org.jgroups.logging.JDKLogImpl error
            SEVERE: failed sending message to company06-23111 (162 bytes): java.lang.Exception: dest=/fe80:0:0:0:200:ff:fe00:0%4:49082

             

            Am I right in guessing that both the Warnings(one in the first post & this one) are related?

             

            Thanks for your help

            • 3. Re: Deploying an infinispan node on a linux machine
              manik

              infini8 infini8 wrote:

               

              WARNING: pineapple-43108: dropped message from company06-23111 (not in xmit_table), keys are [pineapple-43108], view=[pineapple-43108|0] [pineapple-43108]

              cacheKeys = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]
              Jul 1, 2010 5:03:42 PM org.jgroups.logging.JDKLogImpl error
              SEVERE: failed sending message to company06-23111 (162 bytes): java.lang.Exception: dest=/fe80:0:0:0:200:ff:fe00:0%4:49082

               


              Looks like you still are using IPv6. 

              • 4. Re: Deploying an infinispan node on a linux machine
                infini8

                I am running  the jvm with the -Djava.net.preferIPv4Stack=true argument.

                Does'nt it ensure that my program will use IPv4??

                • 5. Re: Deploying an infinispan node on a linux machine
                  manik

                  That is what it is supposed to do, yes.  Are you sure you have this flag on all cluster members?

                  • 6. Re: Deploying an infinispan node on a linux machine
                    infini8

                    yup...

                    Since, its working on Windows & not on Linux, does it have to do something with SE Linux??

                    • 7. Re: Deploying an infinispan node on a linux machine
                      galder.zamarreno

                      Not sure about SE Linux but more likely a kernel or /etc/hosts issue. There's some debugging tips in IPv6

                      1 of 1 people found this helpful