Skip to main content

No peers and groups found. Whats wrong?

4 replies [Last post]
rafapolo
Offline
Joined: 2006-10-21

Hi, I am a Brazilian java programmer who discovered the JXTA API this days. I'm studying by myself the "JXTA 2.3 Programmer's Guide".

Well, I can get into the PeerGroup and get some information, such as this output:

Node PeerID: urn:jxta:uuid-59616261646162614E5047205032503339019E112DE643BE84E6DFC8096F8FD903
Nome do Grupo: NetPeerGroup
Nome do Peer: polo
Node PeerGroupID: urn:jxta:jxta-NetGroup
Parent Group: World PeerGroup
Parent GroupID: urn:jxta:jxta-WorldGroup

However, I cant get any other peer, group, or even Rendezvous peers with the DiscoveryService. I'm behind a NAT.

Is it a configuration problem? How can I solve it?
Thanks

Reply viewing options

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

i don't understand sun tell us jxta really work.
we must be stupid or too much idiots.

rafapolo
Offline
Joined: 2006-10-21

I've been trying to solve it and a information that could be important is that even with MyJxta I only see my own peer.

Why?

wiesion
Offline
Joined: 2006-11-13

Hi,

have a look at this thread:
http://forums.java.net/jive/thread.jspa?messageID=173174&#173174
Seems to be the same problem in a certain way...

Greetz,
Wiesion

rafapolo
Offline
Joined: 2006-10-21

My methods:

public void procuraPeers(){
try {
DiscoveryService procura = netPeerGroup.getDiscoveryService();
procura.addDiscoveryListener(this);
while(true){
System.out.println("Procurando Peers...");
procura.getRemoteAdvertisements(null, DiscoveryService.PEER, null, null, 3);
try {
Thread.sleep(10000); //10 segundos
} catch (Exception e){
e.printStackTrace();
}
}
} catch (Exception e){
e.printStackTrace();
}
}

public void discoveryEvent(DiscoveryEvent discoveryEvent) {
DiscoveryResponseMsg res = discoveryEvent.getResponse();
PeerAdvertisement peerAdv = res.getPeerAdvertisement();
System.out.println("\nDescoberta [" + peerAdv.getName() + "] do Peer " + peerAdv.getName() +".\n");
Enumeration en = res.getAdvertisements();
if (en!=null){
while (en.hasMoreElements()){
PeerAdvertisement adv = (PeerAdvertisement)en.nextElement();
System.out.println("Peer name = " + adv.getName());
System.out.println("Descrição = " + adv.getDescription());
}
}
}