Cluster does not work on Linux
michal_szymanski Oct 5, 2010 9:25 AMI've created test program that put 100000 objects to cache, without any problem it works in cluster (I've tested on two nodes)
on Windows but it does not work on Linux. I've checked network traffic on linux and I do not see any multicast packets even when
programs works on the same machine (multicast work between two host because in the same environment we use mod_cluster) - objects
are not replicated to second node.
I've get following output from after starting program(on both nodes it is the same):
hostt01:~/szymanskim# java -jar test51Multicast.jar
Oct 5, 2010 1:59:50 PM org.infinispan.remoting.transport.jgroups.JGroupsTransport start
INFO: Starting JGroups Channel
Oct 5, 2010 1:59:50 PM org.infinispan.util.logging.AbstractLogImpl info
INFO: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
Oct 5, 2010 1:59:50 PM org.jgroups.logging.JDKLogImpl info
INFO: JGroups version: 2.10.0.GA
Oct 5, 2010 1:59:53 PM org.infinispan.util.logging.AbstractLogImpl info
INFO: Received new cluster view: [hostt01-48705|0] [hostt01-48705]
Oct 5, 2010 1:59:53 PM org.infinispan.util.logging.AbstractLogImpl info
INFO: Cache local address is hostt01-48705, physical addresses are [fe80:0:0:0:230:48ff:feb1:ae82:42161]
Oct 5, 2010 1:59:53 PM org.infinispan.factories.AbstractComponentRegistry internalStart
INFO: Infinispan version: Infinispan 'Radegast' 4.1.0.FINAL
Oct 5, 2010 1:59:53 PM org.infinispan.factories.AbstractComponentRegistry internalStart
INFO: Infinispan version: Infinispan 'Radegast' 4.1.0.FINAL
t - put 100000 objects
n -number of keys in memory
and program is below, should I change something for Linux?
package pl.carrierex.clusterTest;
import java.io.*;
import java.util.Scanner;
import org.infinispan.Cache;
import org.infinispan.config.*;
import org.infinispan.manager.*;
class Cluster {
public static void main(String[] args) throws IOException {
GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
gc.setClusterName("test-cluster");
Configuration c = new Configuration();
c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
EmbeddedCacheManager cm = new DefaultCacheManager(gc, c);
Cache defaultCache = cm.getCache();
System.out.print("t - put 100000 objects\nn -number of keys in memory\n");
String input;
Scanner in = new Scanner(System.in);
while (!(input = in.nextLine()).equals("q") )
{
if(input.equals("n")){
System.out.println("No of keys: "+defaultCache.keySet().size());
} else if(input.equals("t")){
long start = System.currentTimeMillis();
for (int i=0; i<100000; i++)
defaultCache.put(i, i);
System.out.println("Performance= "+((double)100000)
/(((double)(System.currentTimeMillis()-start))/1000)+"put/sec.");
}
}
System.exit(0);
}
}