Re: JXTA cannot discover peers behind NATs?
Mark Griffin <[email protected]> Wed, 20 Dec 2006 11:58:09 -0500
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
I have a test program that gets the same results. The peers connect to the net rendezvous then publish and discover a group advertisement then publish and discover each other's pipe advertisement. Once a peer has joined the group it starts a listening thread and a sending thread. The sending thread iterates through the list of discovered peers sending a message to their pipe. The listening thread echos messages back to the sending peer. So once you launch the peer you can sit and watch it discover and echo messages to all other discovered peers. The output looks like ping with time stamps, etc.. The net rendezvous connect usually happens quickly. The publish / discover of the peer group advertisement in order to join the group can take a half hour or more but it usually does work. Then the rest of the application behaves well. I can move peers to different networks while the application continues to run and they eventually join back in on the ping game. I'm probably using the JXTA API wrong or inefficiently in my sample app. If anybody wants to take a look at it let me know. I have it somewhat packaged up and ready to go. You just need to edit your group and peer name in the launch script and away you go. -Mark On Dec 19, 2006, at 8:58 PM, Alan Zhang wrote: > It seems JXTA cannot discover peers behind NATs and two peers both > behind > NATs cannot connect to each other. I did a simple test by starting > two jxta shell > in one machine with different PIDs and different tcp ports. I > diabled local > multicasting to force the two peers to talk to each other via relay > and > rendezvous. Using "rdvstatus" command and "relaystatus" command, I > found > both peers could connect to a relay and a rendezvous, but they > couldn't see > each other even when they were connected to a same rendezvous peer(i.e > jxta-38). I also created a pipe adv in one peer and tried to find > the adv in the > other peer but failed. I guess the relay peer might be a problem, > because a > edge peer behind NAT has to poll its relay peer for messages, if > the edge peer > failed to get other peers' query messages from the relay peer, it > cannot answer > the query to uncover itself to other peers. Any insight? > > Thanks! > > Alan > 2006/12/20 > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com