Skip to main content

ADHOC peer can’t see an EDGE peer on the same subnet

5 replies [Last post]
surftom
Offline
Joined: 2008-11-19

I’ve configured some peers as EDGE peers connected to a RDV and some peers as ADHOC peers on the same subnet as the EDGE peers. I’m surprised that the ADHOC peer cannot see the EDGE peers. What’s wrong with my setup?
(the EDGE peer will be visible to the ADHOC peer if I reconfigure that EDGE peer to an ADHOC peer meaning they are really on the same multicast subnet)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
felbinac
Offline
Joined: 2008-10-02

The book 'Practical JXTA' says the following:

Ad hoc is the most minimal JXSE configuration a peer can use.
Typically, these peers do not connect to infrastructure peers like relays or rendezvous to benefit from their services.

(excerpted from page 132)

adamman71
Offline
Joined: 2007-01-31

Hi,

Can you explain what you mean by 'see'? What method are you using to 'see' other peers? Are you using the discovery service? Are you trying to use a ping-like method like the one described in www.practicaljxta.com?

Thanks,

J.

surftom
Offline
Joined: 2008-11-19

Hi,

I’m using the [b]discovery service[/b].
Meanwhile I further investigated the problem and boiled it down to the following scenario, i.e. it seems that my problem is not related to the ADHOC mode anymore:

1. I have two subnets A (192.168.0.0) and B (192.168.1.0).
2. I have one peer running in each subnet (Peer1 in A and Peer2 in B)
3. Both peers are configured as Rendezvous as described below.
4a. Peer1 is configured without any RDV seed URI and started first (this is the very first RDV peer running)
4b. Peer2 is configured with an RDV seed URI of Peer1 (using addSeedRendezvous) and started after Peer1.
5. Retrieving the PeerView information of both Peers shows, that a PeerView has been constituted that consists of Peer1 and Peer2 (which is the expected behavior).

[b]Test:[/b]
a. start peer discovery on Peer2 --> this retrieves the peer advertisement of Peer1 from Peer1
b. start peer discovery on Peer1 --> it doesn’t result in receiving any peer advertisement from Peer2, i.e. “Peer1 can’t see Peer2”

[u]Some details of the peer configuration:[/u]
…
manager = new NetworkManager(NetworkManager.ConfigMode.RENDEZVOUS,"test");
…
NetworkConfigurator myConfig = manager.getConfigurator();

// Peer2 gets a Rendezvous Address of Peer1
myConfig.addSeedRendezvous(URI_of_Peer1_with_Port);

myConfig.setMode( NetworkConfigurator.RDV_SERVER +
NetworkConfigurator.EDGE_NODE);
myConfig.setTcpIncoming(true);
…

[i]Is there anything wrong with my peer setup – possibly a wrong combination of the NetworkConfigurator flags?[/i]

Regards
Tom
[u][/u]

adamman71
Offline
Joined: 2007-01-31

mmmmm.... some ideas:

i) Are both peers in the same peer group? (I bet that yes, but just double-checking)

ii) Do you have the same problem if Peer1 is only configured as an EDGE? I am asking this, because somewhere far in my mind, I think someone has faced a similar issue and an incident has been created (see https://jxta-jxse.dev.java.net/issues/query.cgi). One would have to check this. May be a solution has already been posted in the nightly builds.

iii) Else, I would consider this as a bug and you should notify the dev mailing list (but only after having tested your code with the latest nightly build and still face the same issue).

Hope this helps,

J.

jtanago
Offline
Joined: 2008-06-18

I think that the ADHOC mode is only for testing purpouses and it only works with other peer in ADHOC mode too. But I'm not sure, maybe somebody could help us.