Paul Illingworth | 2 Jun 14:01 2014

[jgroups-users] NPE logged by FORK protocol when fork_stack_id not found on local node.

Deal all,

I am getting an error logged when using the FORK protocol. I am using jgroups-3.4.4.Final.

ERROR [Incoming-2,shared=udp] (FORK.java:111) - failed passing up batch
java.lang.NullPointerException
        at org.jgroups.protocols.FORK.up(FORK.java:108)
        at org.jgroups.protocols.FRAG2.up(FRAG2.java:182)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:434)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:434)
        at org.jgroups.stack.Protocol.up(Protocol.java:409)
        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:294)
        at org.jgroups.protocols.UNICAST2.removeAndPassUp(UNICAST2.java:919)
        at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:800)
        at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:415)
        at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:600)
        at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)
        at org.jgroups.protocols.FD.up(FD.java:255)
        at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:301)
        at org.jgroups.protocols.MERGE2.up(MERGE2.java:209)
        at org.jgroups.protocols.Discovery.up(Discovery.java:379)
        at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2615)
        at org.jgroups.protocols.TP.passMessageUp(TP.java:1405)
        at org.jgroups.protocols.TP$MyHandler.run(TP.java:1591)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)

In my case I am configuring Infinispan with a stack that contains the FORK protocol - but no fork stacks defined. For additional JChannels I am hijacking the Infinispan channel and passing in the fork_stack_id at this point.

The error is logged when the FORK protocol receives a message from a fork_stack_id that the local node does not currently have. I would have thought that in this case this should be handled quietly with a simple null check and no exception logged (or maybe logged at a much lower level than error).

            Protocol bottom_prot=get(fork_stack_id);
            MessageBatch mb=new MessageBatch(batch.dest(), batch.sender(), batch.clusterName(), batch.multicast(), list);
            try {
// CHECK FOR NULL HERE PERHAPS?
                bottom_prot.up(mb);
            }
            catch(Throwable t) {
                log.error("failed passing up batch", t);
            }

Other than noise in my log file it is not causing any issues.

Is this a real issue or is it down to me not configuring or using FORK in the way it was intended? Am I supposed to be able to create forked stacks dynamically like this?

Paul I.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
javagroups-users mailing list
javagroups-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javagroups-users
thisara | 1 Jun 21:14 2014
Picon

[jgroups-users] JGroup Simplechat application for Android Phones

Hi,

I'm new to developing. I want to develop JGroup simple chat application in
Android. I'm using Android Developer tool kit to develop the application.
Below are the two classes created in project. One is main activity class and
other one is the simple chat program. I tried to run this application in two
android virtual devices. But it is not working. Highly appreciate if someone
can help me to develop this program.

/package com.example.jgroupan;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity{

	 <at> Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		new Thread(new Runnable() {
			
			 <at> Override
			public void run() {
				try {
					new SimpleChat().start();
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
			}
		});
	}

	 <at> Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
/

And other class is 

/package com.example.jgroupan;

import org.jgroups.ReceiverAdapter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import org.jgroups.JChannel;
import org.jgroups.Message;
import org.jgroups.ReceiverAdapter;
import org.jgroups.View;

public class SimpleChat extends ReceiverAdapter{
	
    JChannel channel;
    String user_name = System.getProperty("user.name", "n/a");

	public void start() throws Exception {
        System.setProperty("java.net.preferIPv4Stack" , "true");
        channel = new JChannel();
        channel.setReceiver(this);
        channel.connect("chatCluster");
        System.out.println("address");
        eventLoop();
        channel.close();
    }	

    private void eventLoop() {
        BufferedReader in = new BufferedReader(new
InputStreamReader(System.in));
        while (true) {
            try {
                System.out.print("> ");
                System.out.flush();
                String line = in.readLine().toLowerCase();
                if (line.startsWith("quit") || line.startsWith("exit")) {
                    break;
                }
                line = "[" + user_name + "] " + line;
                Message msg = new Message(null, null, line);
                channel.send(msg);
            } catch (Exception e) {
            }
        }

    }

    public void viewAccepted(View new_view) {
        System.out.println("** view: " + new_view);
    }

    public void receive(Message msg) {
        System.out.println(msg.getSrc() + ": " + msg.getObject());
    }

}/

--
View this message in context: http://jgroups.1086181.n5.nabble.com/JGroup-Simplechat-application-for-Android-Phones-tp10238.html
Sent from the JGroups - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
Bela Ban | 28 May 13:47 2014
Picon

[jgroups-users] JGroups 3.5.0.Beta7

FYI,

I just released Beta7; it contains Tristan's SASL related changed and my 
monster commit for JGRP-1826 [1].

JGRP-1826 contains a lot of changes to the discovery protocols, and 
forms the basis to make discovery of file based (FILE_PING) or cloud 
based stores (S3_PING, GOOGLE_PING) much faster, especially for large 
clusters.

However, it won't be until JGRP-1841 [1] for these optimizations to come 
into play.

Nevertheless I wanted to merge this monster commit and tackle the 
remaining work in new branches.

It also removes dependencies between merge and discovery protocols; the 
code is much cleaner now.

I tested the following discovery protocols with UDP(ip_mcast=false) and 
TCP for discovery and merging (MERGE3):
- PING
- MPING
- TCPPING
- TCPGOSSIP
- FILE_PING
- GOOGLE_PING
- JDBC_PING

*Not* tested were S3_PING, SWIFT_PING and RACKSPACE_PING.

S3_PING *should* work, as it contains almost all functionality of 
GOOGLE_PING (which extends it), but it would nevertheless be good if we 
could test this.

Volunteers ?

Cheers,

[1] https://issues.jboss.org/browse/JGRP-1826
[2] https://issues.jboss.org/browse/JGRP-1841
--

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
Bela Ban | 27 May 09:39 2014
Picon

[jgroups-users] Deprecated shared transports in 4.0 ?

I'm thinking of deprecating the shared transport [1] and remove it in 
4.0. The replacement would be fork channels [2].

Here's my reasoning:

- Shared transports are quite a complex beast: initialization (ref 
counting), cluster-name and local-addr are not used in TP when shared, 
duplicate logic. Removing this will make the code base smaller

- All protocols *above* shared transports are not shared, e.g. FD_SOCK, 
NAKACK, UNICAST etc all maintain their own threads, retransmission 
tables, sockets etc. With fork channels, everything up to the FORK 
protocol *is* shared

- TUNNEL doesn't work with shared transports (throws an exception)

- Hidden insertion of TP$ProtocolAdapter into the stack when shared 
transports are used

- Unneeded cost of sending N-1 messages (e.g. with TCP). Currently we 
send a message with dest null and no IP multicast capable transport to 
all physical addresses in the transport, which is a waste

Thoughts ? My +100 for removing shared transports in 4.0...

[1] http://www.jgroups.org/manual/html/user-advanced.html#SharedTransport
[2] http://www.jgroups.org/manual/html/user-advanced.html#ForkChannel
-- 
Bela Ban, JGroups lead (http://www.jgroups.org)

--

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)

------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
Aloka Munasinghe | 16 May 14:20 2014
Picon

Re: [jgroups-users] Discarded message from non-member JGroups 2.6.5.GA

Hi Bela,

This issue posted by Prasad sometime ago has reoccurred in our production
environment.

As Prasad has mentioned there are two clusters in the system. If a cluster
member is dropped from one of these clusters, it is not rejoined to the
cluster unless we restart the system. We have been using jgroups 2.6.5GA.

Now we have updated the jgroups version to 3.2.7. We didn't change any
configurations in the jar. With the new version we have been using different
multicast addresses to separate these 2 clusters. But still this issue is
not completely solved. Sometimes the cluster is formed successfully after a
member is dropped, but most of the times it is not happening. What is the
cause of this issue?

Further we use jboss-cache 3.2.5. Are there any compatibility issues between
these jgroups and jboss-cache versions?

Regards,
Aloka 

--
View this message in context: http://jgroups.1086181.n5.nabble.com/jgroups-users-Discarded-message-from-non-member-JGroups-2-6-5-GA-tp9649p10219.html
Sent from the JGroups - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
Nickqwer | 11 May 18:17 2014
Picon

[jgroups-users] Not member of view warning

I had tree working nodes, but suddenly the third one disconnected and started
to output the logs below. What can be the cause of such exception?

WARNING: SPB-NUMNIKOV1-26256: not member of view
[SPB-NUMNIKOV1-18276(beefy)|20]; discarding it
11.05.2014 20:00:21 org.jgroups.logging.JDKLogImpl warn
WARNING: JGRP000032: SPB-NUMNIKOV1-26256: no physical address for
SPB-NUMNIKOV1-18276(beefy), dropping message
WARNING: JGRP000032: SPB-NUMNIKOV1-26256: no physical address for
SPB-NUMNIKOV1-18276(beefy), dropping message
11.05.2014 20:00:25 org.jgroups.logging.JDKLogImpl warn
WARNING: JGRP000032: SPB-NUMNIKOV1-26256: no physical address for
SPB-NUMNIKOV1-18276(beefy), dropping message
11.05.2014 20:00:27 org.jgroups.logging.JDKLogImpl warn
WARNING: JGRP000032: SPB-NUMNIKOV1-26256: no physical address for
SPB-NUMNIKOV1-18276(beefy), dropping message
11.05.2014 20:00:28 org.jgroups.logging.JDKLogImpl warn
WARNING: JGRP000032: SPB-NUMNIKOV1-26256: no physical address for
SPB-NUMNIKOV1-18276(beefy), dropping message
11.05.2014 20:00:31 org.jgroups.logging.JDKLogImpl warn

--
View this message in context: http://jgroups.1086181.n5.nabble.com/Not-member-of-view-warning-tp10197.html
Sent from the JGroups - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
Nickqwer | 10 May 13:39 2014
Picon

[jgroups-users] Create UUID from String

Hi.
Is it possible somehow create UUID from String?

--
View this message in context: http://jgroups.1086181.n5.nabble.com/Create-UUID-from-String-tp10191.html
Sent from the JGroups - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
Alex O'Ree | 10 May 02:06 2014
Picon

[jgroups-users] Android support

Has there been any updates on the Android front?

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
javagroups-users mailing list
javagroups-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javagroups-users
g4 g | 9 May 22:32 2014
Picon

[jgroups-users] RELAY2 cannot be cast to org.jgroups.protocols.TP

Hi,
Trying to play around with RELAY2 using jgroups 3.2.10

Getting this error:

java.lang.ClassCastException: org.jgroups.protocols.relay.RELAY2 cannot be cast to org.jgroups.protocols.TP
    at org.jgroups.stack.Protocol.getTransport(Protocol.java:156)
    at org.jgroups.protocols.relay.RELAY2.init(RELAY2.java:149)
    at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:857)
    at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:469)
    at org.jgroups.JChannel.init(JChannel.java:786)
    at org.jgroups.JChannel.<init>(JChannel.java:162)
    at org.jgroups.JChannel.<init>(JChannel.java:142)


My JChannel is being fed this file, per the docs "To use RELAY2, it has to be placed at the top of the configuration, e.g.:"

    <relay.RELAY2 site="site2" config="/path/to/my/relay2.xml" relay_multicasts="true" />       
    <FORWARD_TO_COORD />
    <UDP bind_addr="192.168.0.5" mcast_port="7600" />
.....
.....
.....
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
javagroups-users mailing list
javagroups-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javagroups-users
Nickqwer | 9 May 14:13 2014
Picon

[jgroups-users] Address Uniqueness

Hi, is it true that since address == local_host_name + random_number, then it
is possible that two started nodes on the same machine can get the same
address?

--
View this message in context: http://jgroups.1086181.n5.nabble.com/Address-Uniqueness-tp10179.html
Sent from the JGroups - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
Bela Ban | 9 May 13:55 2014
Picon

[jgroups-users] Emails from belaban <at> yahoo.com geting dropped ?

Test. People told me that my emails are getting dropped due to some new 
policy implemented by Yahoo...

--

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce

Gmane