Skip to main content

Connect to Rdvz through the http transport method

6 replies [Last post]
Joined: 2007-07-11


I have succeeded in creating a private group with JXTA, with one RDVZ peer and some edge peers. I am using the configuration of the example ( ).

I have some questions though!

1. Why do the edge peers have the
Don't these peers ever have to accept connections on a listening tcp port?

2. I have created a RDV peer outside my LAN (NAT). On that peer I additionally set:

configurator.setHttpEnabled(true); // new addition
configuratorsetHttpIncoming(true); // new addition

According to the jxse-javadoc this peer should now be also listening for http connections (on the default port 9901). But it does not seem to do so.

I mean I configured my edge peers to try to connect to:

But no connection happens with the external RDVZ. (I shut-down the local RDVZ peer before testing).

Note that in the edge peer code I have also put an additional command: configuratorsetHttpOutgoing(true);
so that it would attempt to connect through the http protocol.

What am I doing wrong?

P.S. I am however able to connect to the external RDVZ through the tcp method(!). I just want to know how can someone use the http method and how that works.

Message was edited by: jxtaenigma

Message was edited by: jxtaenigma

Reply viewing options

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

Hi jxtaenigma

At first I hope to thank you for your answer, you have understand well what I hope to do, [b]is to create my own IDs[/b]. I use like you told me the from the example of [b]JXSE_ProgGuide_v2.5_draft.pdf (June 7th, 2007) pp-35[/b], I obtain the following result (by use [b]netbeans[/b] and [b]jxta2.5rc[/b]):

Created dir: C:\Test\IDTutorial2.5\build\classes
Compiling 1 source file to C:\Test\IDTutorial2.5\build\classes

An infrastucture PeerGroupID: urn:jxta:uuid-*********
PeerID with the above infra ID encoding: urn:jxta:uuid-*********
PipeID with the default defaultNetPeerGroupID encoding: urn:jxta:uuid-********

BUILD SUCCESSFUL (total time: 0 seconds)


[b]First question-[/b] Must I in the program using by the example ( ) put for in line 53 (found in

// our chosen peer ID
private String peerID = 'urn:jxta:uuid-**********

I found above, which is PeerID with the above infra ID encoding: urn:jxta:uuid-*********

Is it true?

[b]Second question-[/b] Concerning the line
// parameters that define our private JXTA NetPeerGroup
String NetPeerGroupID='urn:jxta:uuid-**********';

How I can found the NetPeerGroupID by use JXSE_ProgGuide_v2.5_draft.pdf, because when I do the example I found PeerGroupID and not NetPeerGroupID can you show me please because I am newbie in jxta.

Moreover, can you please show me please how to found the 'urn:jxta:uuid- ****** of
String gid and String specID

By use the the from the example of JXSE_ProgGuide_v2.5_draft.pdf (June 7th, 2007) pp-35.

[b]My last question -[/b] When I read your answer in the forum you speak about (I also use the "activeports" windows application). How and Where I can found this active port in windows please?

Sorry for all these simple questions (for you) I asked to you but I hope learn how it works jxta.

Thank you very much for your help.

Joined: 2007-06-14

Hi Enigma,

First off, I'm not an expert with jxta, but I've been fiddling with the same area as you for a while so I thought I might be able to help. It seems to be thanks to an irritating lack of information out there about configuring your different nodes and how it works.

Anyway, my first suggestion is, shortly after starting the peer group on your rdv server, print the group config params to the console and take a look at your configuration. This should show you which http/tcp incoming/outgoing connections are enabled and also what ports they're listening to and transmitting on. It should also tell you somewhere in there how your rendezvous and relay servers are configured. That way you can verify that what you think is running, is actually running.

One thing that you need to do also is make sure your rendezvous server is running as a relay server and that your edge peers are relay clients. I seem to recall reading something about the relay server being required for outside connections and it also seems to automatically find a route out of your local network.

Finally, if you need to confirm that certain ports are open and contactable on your server/clients I'd recommend using a great little tool called "netcat". Very handy for network problems.

hope that helped!

Joined: 2007-07-11

I am using netstat -an (from windows) to see the listening ports and the established connections. (I also use the "activeports" windows application).

How can I print the group config parameters? I am not sure I understand this.
I get my info on how a peer is set-up, from the PlatformConfig in its jxta home folder.

For example on my edge peers (which are configured with setHttpOutgoing(true)) I can see that in their PlatformConfig at the paramater :
(jxta:TransportAdvertisement xmlns:jxta="" type="jxta:HTTPTransportAdvertisement") (somewhere it says ServerOff)
There it says that the peer is not acting as http server. Which is what I want.
And when I run this peer, I see it trying to connect to the port I specified for the http connection to the rendezvous.
(e.g. it tries to connect to After a while I think that it also tries to connect to a bunch of outside peers (at port 80) that I have not provided in the seeds.txt file. Could they be hardcoded in the jxta SE implementation?

Now on my rendezvous peer, which are configured as HTTP servers, I can also see this in the corresponding PlatformConfig at the paramater :
(jxta:TransportAdvertisement xmlns:jxta="" type="jxta:HTTPTransportAdvertisement") (somewhere it says ClientOff).
But when I run the rendezvous peer, the port I have specified for HTTP connections is not shown as a LISTENING port from netstat or activeports. And the edge peers never discover my rendezvous peer, even though in their seeds.txt file, I have explicitily put the rendezvous address and http port.

The edge peers are rendezvous and relay clients, and also TCP and HTTP clients. The rendezvous peer is a rendezvous server, relay server, tcp and http server.

Message was edited by: jxtaenigma

Joined: 2007-06-14

Ok, netstat isn't the same as netCAT. netcat allows you to check if ports are open on remote machines. It's a free tool and you can get it here:

Next, if you want to see your configuration looking at the PlatformConfig file is one way to do it. If you want to access it from the program:

Next, I think there are (although I'm not 100% sure) standard rendezvous peers hardcoded into jxta. However, my guess is they're stored in the Network Configurator.
If you don't want this to happen, try using:

Finally... I'm not sure why the port isn't listening. Your http part of your platform config should look something like this:




(Using the Network Configurator)
gets set through the method:
gets set through the method:
setHttpPublicAddress("", false);

right, hope that answers your questions!

Message was edited by: jimbosi

Message was edited by: jimbosi

Joined: 2007-06-14

Hi jxtaenigma,

You said that you have succeeded in creating a private group with JXTAby using the example ( ).
I try also to use this example but I have a question because I don't know how to do. can you please help to me.

my question is :

In the example it is write

private String NetPeerGroupID="urn:jxta:uuid-";

and also

public void createApplicationPeerGroup() {

// key parameters for the new "appPeerGroup"
String name = "";
String desc = "";
String gid = "urn:jxta:uuid-";
String specID = "urn:jxta:uuid-";

my question is how to fix the values of

String gid = "urn:jxta:uuid-";
String specID = "urn:jxta:uuid-";

Thank you very much for your help.

Joined: 2007-07-11

I am not sure I understand what you mean by "fix the values".

There is some sample code in the current [url=*checkout*/jxta-guide/trunk/src/guide_v2.5/JXSE_ProgGuide_v2.5_draft.pdf]JXSE_ProgGuide_v2.5_draft.pdf[/url] which is named . It shows how you can create your own IDs for Groups, Pipes and Peers.

I mostly used that code to create my IDs. And then I used the toString() method to print them out and save them in a config.txt that my peers use to initialize themselves. Usually this is unecessary because the peer IDs are stored in the local jxta home folder.

But I wanted the IDs to be persistent even if I deleted that PlatformConfig file, so I created this Config.txt file. So far this works well.