Skip to main content

a problem in pipe discovery

4 replies [Last post]
b1053710220
Offline
Joined: 2008-09-02
Points: 0

background:
a programe is ok when it was run in a lab, people are able to find and communicate well by Socket.
Problem:
when a PC run the programe twice in different directories.
( eg.
E:\Program\
and
E:\test\ )
or
when two peers are in different subnet.
the two cann't find each other.

I write a test programe here.

Please help me.
thx

Reply viewing options

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

Hi,

Some examples are pretty simple to execute, but others are more complicated. This is why I wrote the book. The ones with the single pipe connection is the most complex, but the others are relatively simple to execute. Regarding exploring connectivity, you would need the book to understand all details.

If you have a specific question, do not hesitate.

Thanks,

J.

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

Your programs are written in such a way that they will use the same directory to store local configuration when ran from the same directory. So, one will see the other's advertisements too, because they are using the same directory. But this is not the right way to proceed. Each peer should have its own and separate local configuration directory. They should never share the same local configuration directory. If your application works, it is an accident.

If your application does not work on different subnets, it is most probably because your router does not propagate TCP/IP multicast packets from one subnet to the other properly (I mean for the default JXTA multicasting address).

At last, the defaults seeds are there for test basic test purposes, but you should not rely on them too much to operate your network. It is better if you have your own seeds.

If you run your peers in the same subnet, you need to set one peer as a RDV for the other. See www.practicaljxta.com code examples to learn how to do this when running both peers from the same PC. If you want to run your peers from different subnets, you need to check your router configuration.

Hope this helps,

J.

b1053710220
Offline
Joined: 2008-09-02
Points: 0

thank you so much for your reply.

I downloaded the examples on www.practicaljxta.com
when I want to run B-example to learn how Rendezvous works.
But I don't know how to run the examples ?
the order and the right time to wait.

and
What does the example want to tell.
thanks

b1053710220
Offline
Joined: 2008-09-02
Points: 0

Besides, when I run the examples.
The rusults is:

Jack start a socket connection on : 0.0.0.0/9710
Anne failed to connect Jack ,
because the net address she found is 172.16.4.108/9710
(172.16.4.108 is the IP of my PC)

0.0.0.0/9710 is really a crazy address, what's wrong?