Re: [javagroups-users] Fwd: Setting Locking protocol
Brought to you by:
belaban
From: sujit k. <suj...@gm...> - 2011-05-25 12:53:13
|
Hi Bela Thanks a lot for your kind help. By real IP do you mean IP of the box(e.g Solaris/Linux) where I have my manage server instances? I am using jGroups with Weblogic 10.3 Regards Sujit On 25 May 2011 16:20, Bela Ban <be...@ya...> wrote: > The error message below says it all: a bind address cannot be the > wildcard address (0.0.0.0). This has nothing to do with the locking > protocol. I suggest remove bind_addr=0.0.0.0 and set the real IP address > > On 5/25/11 9:51 AM, Kumar, Sujit wrote: > > Hi Bela > > > > Sorry but I was unable to pick the attached thread from > > 'javagroups-users' forum so replying this way. > > After setting up CENTRAL_LOCK protocol as you suggested we are facing > > following issue intermittently. > > > > Caused by: org.jgroups.ChannelException: failed to start protocol stack > > at org.jgroups.JChannel.startStack(JChannel.java:1787) > > at org.jgroups.JChannel.connect(JChannel.java:413) > > at org.jgroups.JChannel.connect(JChannel.java:388) > > at > > com.csg.cs.riskit.tsrd.lock.JGroupsDistributedLockManager.initManager(JG > > roupsDistributedLockManager.java:70) > > ... 73 more > > Caused by: java.net.BindException: bind_addr /0.0.0.0 is not a valid > > interface: java.net.BindException: Address already in use > > at org.jgroups.util.Util.createServerSocket(Util.java:3055) > > at > > org.jgroups.blocks.TCPConnectionMap.<init>(TCPConnectionMap.java:87) > > at > > org.jgroups.blocks.TCPConnectionMap.<init>(TCPConnectionMap.java:54) > > at org.jgroups.protocols.TCP.createConnectionMap(TCP.java:130) > > at org.jgroups.protocols.TCP.start(TCP.java:64) > > at > > org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:990) > > at org.jgroups.JChannel.startStack(JChannel.java:1784) > > ... 76 more > > [ERROR][25-May 08:06:47,620][] error sending notification > > [NotificationBus] > > ChannelNotConnectedException > > at > > org.jgroups.JChannel.checkClosedOrNotConnected(JChannel.java:1840) > > at org.jgroups.JChannel.send(JChannel.java:726) > > at > > org.jgroups.blocks.NotificationBus.sendNotification(NotificationBus.java > > :161) > > at > > org.jgroups.blocks.NotificationBus.sendNotification(NotificationBus.java > > :143) > > at > > net.sf.ehcache.distribution.jgroups.JGroupManager.send(JGroupManager.jav > > a:271) > > at > > net.sf.ehcache.distribution.jgroups.JGroupManager.send(JGroupManager.jav > > a:263) > > at > > net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.flushReplicat > > ionQueue(JGroupsCacheReplicator.java:380) > > at > > net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.replicationTh > > readMain(JGroupsCacheReplicator.java:338) > > at > > net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator.access$000(JG > > roupsCacheReplicator.java:45) > > at > > net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicator$ReplicationTh > > read.run(JGroupsCacheReplicator.java:317) > > [ERROR][25-May 08:07:12,646][] failed running task > > org.jgroups.protocols.FILE_PING$WriterTask@55b021a6 > > <mailto:org.jgroups.protocols.FILE_PING$WriterTask@55b021a6> > > [TimeScheduler2] > > java.lang.NullPointerException > > at java.io.File.<init>(File.java:305) > > at > > org.jgroups.protocols.FILE_PING.writeToFile(FILE_PING.java:221) > > at > > org.jgroups.protocols.FILE_PING$WriterTask.run(FILE_PING.java:246) > > at > > org.jgroups.util.TimeScheduler2$RecurringTask.run(TimeScheduler2.java:59 > > 2) > > at > > org.jgroups.util.TimeScheduler2$MyTask.run(TimeScheduler2.java:524) > > at > > org.jgroups.util.TimeScheduler2$Entry.execute(TimeScheduler2.java:429) > > at > > org.jgroups.util.TimeScheduler2$1.run(TimeScheduler2.java:295) > > at > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto > > r.java:886) > > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja > > va:908) > > at java.lang.Thread.run(Thread.java:619) > > > > > > ere is my code which uses locking.. > > > > channel1 = new JChannel(getProperty("jgroups.locking.config")); > > > > lockService = new LockService(channel1); > > > > channel1.connect("lock-cluster"); > > > > lockService.addLockListener(this); > > > > JmxConfigurator.registerChannel(channel1, mbeanserver, "lock-service", > > channel1.getClusterName(), true); > > > > > > > > > > > > Thanks > > Sujit > > 1 Serangoon North Ave 6(SIP) > > +65 6306 9062 (O) > > > > > > > > ________________________________ > > > > From: sujit kumar [mailto:suj...@gm...] > > Sent: 19 May 2011 18:33 > > To: Kumar, Sujit > > Subject: Fwd: [javagroups-users] Fwd: Setting Locking protocol > > > > > > > > > > ---------- Forwarded message ---------- > > From: Bela Ban<be...@ya...> > > Date: 19 May 2011 17:30 > > Subject: Re: [javagroups-users] Fwd: Setting Locking protocol > > To: jav...@li... > > > > > > > > > > > > On 5/10/11 6:05 PM, sujit kumar wrote: > >> Hi friends > >> > >> I am in process of migrating from jgroups-2.10.0.GA to > > jgroups-2.12.0.Final > >> for using LockService. > >> I searched all over on web to see an example for how to set a locking > >> protocol as Bela Ban has mentioned as /home/bela/lock.xml in one of > > his > >> blog. But unfortunately I could not find it. > > > > > > > > Take a look at > > http://www.jgroups.org/manual/html/user-building-blocks.html#d0e2543. > > Simply copy udp.xml and add<CENTRAL_LOCK /> or<PEER_LOCK/> to the top > > of the stack (over FLUSH). > > > > > > > > > >> Currently my config is defined as > >> > >> #* **jgroups* locking* config* > >> > > jgroups.locking.config=TCP(bind_addr=0.0.0.0;bind_port=21200;port_range= > > 5):FILE_PING(location=/ > >> *app*/log/*dev*/*jgroupslockingcontrol* > >> > > ;num_initial_members=1;num_ping_requests=20):MERGE2(min_interval=500;max > > _interval=10000):FD_SOCK:FD(timeout=2000;max_tries=4):VERIFY_SUSPECT(tim > > eout=1500):BARRIER:pbcast.NAKACK(use_mcast_xmit=false;gc_lag=0;retransmi > > t_timeout=300,600,1200,2400,4800;discard_delivered_msgs=true):UNICAST(ti > > meout=300,600,1200):pbcast.STABLE(stability_delay=1000;desired_avg_gossi > > p=50000;max_bytes=400K):pbcast.GMS(print_local_addr=true;join_timeout=30 > > 00;view_bundling=true):FC(max_credits=2M;min_threshold=0.10):FRAG2(frag_ > > size=32767):pbcast.STREAMING_STATE_TRANSFER > > > > > > > > Ouch ! I discourage use of the plain string notation, why don't you > > switch to XML ? > > > > But if you have to, the new config would be > > > > #* **jgroups* locking* config* > > > >> > > jgroups.locking.config=TCP(bind_addr=0.0.0.0;bind_port=21200;port_range= > > 5):FILE_PING(location=/ > >> *app*/log/*dev*/*jgroupslockingcontrol* > > > >> > > ;num_initial_members=1;num_ping_requests=20):MERGE2(min_interval=500;max > > _interval=10000):FD_SOCK:FD(timeout=2000;max_tries=4):VERIFY_SUSPECT(tim > > eout=1500):BARRIER:pbcast.NAKACK(use_mcast_xmit=false;gc_lag=0;retransmi > > t_timeout=300,600,1200,2400,4800;discard_delivered_msgs=true):UNICAST(ti > > meout=300,600,1200):pbcast.STABLE(stability_delay=1000;desired_avg_gossi > > p=50000;max_bytes=400K):pbcast.GMS(print_local_addr=true;join_timeout=30 > > 00;view_bundling=true):FC(max_credits=2M;min_threshold=0.10):FRAG2(frag_ > > size=32767):pbcast.STREAMING_STATE_TRANSFER:CENTRAL_LOCK > > > > > > > > > > > > -- > > Bela Ban > > Lead JGroups / Clustering Team > > JBoss > > > > > > ------------------------------------------------------------------------ > > ------ > > What Every C/C++ and Fortran developer Should Know! > > Read this article and learn how Intel has extended the reach of its > > next-generation tools to help Windows* and Linux* C/C++ and Fortran > > developers boost performance applications - including clusters. > > http://p.sf.net/sfu/intel-dev2devmay > > _______________________________________________ > > javagroups-users mailing list > > jav...@li... > > https://lists.sourceforge.net/lists/listinfo/javagroups-users > > > > > > > > > > -- > Bela Ban > Lead JGroups / Clustering Team > JBoss > > > ------------------------------------------------------------------------------ > vRanger cuts backup time in half-while increasing security. > With the market-leading solution for virtual backup and recovery, > you get blazing-fast, flexible, and affordable data protection. > Download your free trial now. > http://p.sf.net/sfu/quest-d2dcopy1 > _______________________________________________ > javagroups-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javagroups-users > |