Skip to main content

Discover peers connected to the same rendezvous

6 replies [Last post]
Joined: 2009-07-02

Hello everybody,

I have a scenario where there are two edge peers and a rendezvous and none of them are using multicast. Both edge peers connect two the rendezvous and publish a pipe advertisement using publish and remote publish.

After that, they try to discover the other peer using:

discovery.getRemoteAdvertisements(null, DiscoveryService.PEER, null, null, 3, this);

But the only advertisement in the answer corresponds with the rendezvous.

Then, they try to discover the pipe advertisement publish by the other edge peer using:

discovery.getRemoteAdvertisements(null, DiscoveryService.ADV, "Name", null, 3, this);

And the answer contains the advertisement published by the other edge peer.

Can anybody tell me why the edge peers are not able to obtain the peer advertisement corresponding to the other edge peer but they are able to discover the pipe advertisement published by the other peer?

Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-01-31

Some issues about SRDI info propagation and connectivity between peers have been corrected in the 2.6 beta 2 release. It relates to the problems you are describing. I advise you to try your code with:



Joined: 2006-01-26

I too am having the similar problem.

In my case though, most times I get a response as soon as the edge peers start up. They are able to discover each other but stop receiving discover events after few minutes. In my set up, I have completely disabled TCP for edge peers. The rendezvous accepts both tcp and http.

Apparently all of us have some missing settings for the rendezvous or edge. Any help will be appreciated.

Observation 1:
I dont know if this is related, but if I edges don't get any responses they show this warning: "WARNING: Clearing SRDI tables for failed peer" and after that everything is bombed. The only way to get discovery events are by restarting the edge peers

Observation 2:
Even though I dont get discovery response [hence no peer advs] and I used cached peer advs [my own cache], I am able to connect the two edge peers and send and receive data.

Comment on JXTA:
JXTA seems promising, but its key features are so poorly documented. Everybody seems to be asking the same fundamental questions but there is no clear guidelines as to
1. How to set peers?
Eg: should it be httpincoming or outgoing: If I am behind firewall do i disable TCP etc
2 How to set rendezvous or relay?

If the creators and experts can add one small wiki on how exactly to set the edges and rdv/relay nodes, specially in the real world of NATd/firewalled nodes, JXTA would expand its potential tremendously. So much time wasted in trial and error.

Joined: 2009-11-08

After many hours of hair-pulling I think I have found a solution. I noticed that there were some messages about my peers trying to a) connect to random ports that nothing was listening on and b) connect to their internal NAT'd IP addresses

My public rendezvous is using TCP on port 80, and is in RENDEZVOUS_RELAY mode.
Rendezvous config:

My edge peers both connect to the rendezvous, however they are both behind firewalls so cannot get incoming TCP traffic.
Edge peer config:
setUseMulticast(false); //this was because I was testing my rendezvous and didnt want peers to resolve each other locally
addSeedRelay(new URI("tcp://public-ip-of-rendezvous:80"));
addSeedRendezvous(new URI("tcp://public-ip-of-rendezvous:80"));

It looks like the key here is to forcefully make the Edge peer use port 80 by setting its StartPort and EndPort to -1, and its TcpPort to 80.

Joined: 2009-07-02

Hello everybody,

Does anybody have any suggestion on how to make this work?

I have been doing several changes in the code but I have not been able to make it work.

Thank you in advance.

Joined: 2009-05-31


I think this is because you published only pipe advertisement not peer advertisement (peer info) .

Joined: 2009-07-02


I think this is not the problem, because the two edge peers connected to the rendezvous are receiving a response from the rendezvous.

I think the problem is the rendezvous is not propagating the discovery request among its peers in order to obtain all the possible answers, so it is only able to answer the discovery message with its own identity.

Does anybody know how to configure the rendezvous for it to propagate the discovery messages it receives?