Skip to main content

Two Rendezvous? is possible?

5 replies [Last post]
deniswsrosa
Offline
Joined: 2006-05-05
Points: 0

Hi guys!

So, I am running two rendezvous in the netPeerGroup, but the first one do not find the services published by the second, is there any jxta limitation for that?

Because, when i run just one Rendezvous and N number of ADV peers all services can be find.

Thanks a Lot!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
deniswsrosa
Offline
Joined: 2006-05-05
Points: 0

I have tried start two rendezvous in the same machine... is this possible?
because I'm receiveing this warning:

[b]WARNING: Could not get messenger for tcp://10.1.243.102:9701[/b]

this is my rendezvous configuraion:

configurator.setName(username + "'s peer");
configurator.setPrincipal(username);
configurator.setPassword(password);
PeerID peerId = IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID, username.getBytes());
configurator.setPeerID(peerId);

configurator.setDescription("P2P Peer");
configurator.setUseMulticast(false);
Set seeds = new HashSet();
seeds.add("tcp://10.1.243.102:9701");

List list = new ArrayList();
list.add("tcp://10.1.243.102:9701");

configurator.setRendezvousSeeds( seeds );
configurator.setRelaySeedURIs(list);
configurator.setRelaySeedingURIs(seeds);
configurator.setMode(NetworkConfigurator.RDV_SERVER + NetworkConfigurator.RELAY_SERVER);
configurator.setUseOnlyRendezvousSeeds(true);
configurator.setTcpEnabled(true);
configurator.setTcpIncoming(true);
configurator.setTcpOutgoing(true);
configurator.setTcpStartPort(-1);
configurator.setTcpEndPort(-1);
configurator.setTcpPort(9701);
configurator.setTcpPublicAddress(getLocalIP()+":" + 9701, false);
configurator.setTcpInterfaceAddress(getLocalIP() +":"+ 9701);

and this is my edge peer configuration:

configurator.setPrincipal(username);
configurator.setPassword(password);

PeerID peerId = IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID, username.getBytes());
configurator.setPeerID( peerId );
configurator.setMode(NetworkConfigurator.EDGE_NODE);

Set seeds = new HashSet();
seeds.add("tcp://10.1.243.102:9701");

List list = new ArrayList();
list.add("tcp://10.1.243.102:9701");

configurator.setRendezvousSeeds( seeds );
configurator.setRelaySeedURIs(list);
configurator.setTcpIncoming(true);
configurator.setTcpEnabled(true);
configurator.setTcpOutgoing(true);
configurator.setTcpEnabled(true);
configurator.setTcpIncoming(true);
configurator.setTcpOutgoing(true);

is there something wrong or missing??

Thank you very much!

deniswsrosa
Offline
Joined: 2006-05-05
Points: 0

I just have changed the tcp port in one rendezvouz to 9702 and works well!!

But, is there the only way to make rendezvous work together? if yes, this is very bad, coz i cannot manage how much rdv will exist in my network.

Thank you very much!

smaric
Offline
Joined: 2003-09-03
Points: 0

Don't know if this will help -
When you join the PeerGroup you can

RendezVousService getRendezVousService()
and have you code implement RendezvousListener
then
void addListener(RendezvousListener listener)
so that you get
void rendezvousEvent(RendezvousEvent event)
and from the RendezvousEvent.getType() you can
CLIENTCONNECT
CLIENTDISCONNECT
RDVDISCONNECT
RDVCONNECT
etc

so you can build/maintain the list of Rendezvous available within the PeerGroup you've joined

andrwe2486
Offline
Joined: 2009-05-07
Points: 0

There are 2 things you need to do to make that happen:

1.) These are my setting for my public rendezvous nodes and they seem to work. Most important are setTcpPublicAddress( ) and setTcpPublicInterface()
Those ones allow connections to that IP and port.

MyNetworkManager.setUseDefaultSeeds(false);

// Retrieving the network configurator
NetworkConfigurator MyNetworkConfigurator = MyNetworkManager.getConfigurator();

MyNetworkConfigurator.clearRendezvousSeeds();

// Setting Configuration
MyNetworkConfigurator.setTcpEnabled(true);
MyNetworkConfigurator.setTcpIncoming(true);
MyNetworkConfigurator.setTcpOutgoing(true);
MyNetworkConfigurator.setRendezvousSeeds(seedList);
MyNetworkConfigurator.setTcpStartPort(-1);
MyNetworkConfigurator.setTcpEndPort(-1);
MyNetworkConfigurator.setTcpPort(TcpPort);
MyNetworkConfigurator.setTcpPublicAddress(localHost + TcpPort, false);
MyNetworkConfigurator.setTcpInterfaceAddress(localHost + TcpPort);
MyNetworkConfigurator.setPeerID(PID);
MyNetworkConfigurator.setHttpPort((TcpPort + 5));
MyNetworkConfigurator.setHttpIncoming(false);
MyNetworkConfigurator.setHttpOutgoing(true);
MyNetworkConfigurator.setMulticastPort((TcpPort + 8));
MyNetworkConfigurator.setUseMulticast(true);
MyNetworkConfigurator.setName(Name);

2.) The second thing to make 2 RDVs talk is to add each other as seeds. There are a couple methods to add seeds. I use MyNetworkConfigurator.setRendezvousSeeds(seedList);
where seedList is a Set that i have added the seeds of the other RDVs

Hope that helps I had same trouble.
Another thing is if your doing getRemoteAsvertisements make sure your value isn't 0, I think that means each peer to only reply with their own ad.

deniswsrosa
Offline
Joined: 2006-05-05
Points: 0

Thank you very much for your reply!

But, my network is dynamic, it's impossible know how much rendezvous i can have, is there another way to do this? or show me how can i get this list dynamically.

Tks!

Message was edited by: deniswsrosa