Skip to main content

Connecting to a Super Peer behind Firewall

3 replies [Last post]
arbalet
Offline
Joined: 2009-08-11

Hello,
My environment consists of an exposed super peer, listening to tcp on port 8080 and to http on port 80.

Clients receive the relay/rendezvous seed at startup.
At first, connection were made to tcp://:8080 with no problems, until I've discovered that some firewalls blocked that call, and since than I am working on routing the super peer communication to http, which is
where my problem begins:

I've changed the startup parameter url from tcp://:8080 to http://:80

Now i'm getting this exception on the client:

WARNING: bad URI in seeding list : uuid-59616261646162614E50472050325033ED9C33DF7D6F470ABD10CECAE7B64BD203
java.lang.IllegalArgumentException: Address is not a valid URI: uuid-59616261646162614E50472050325033ED9C33DF7D6F470ABD10CECAE7B64BD203
at net.jxta.endpoint.EndpointAddress.parseURN(EndpointAddress.java:526)
at net.jxta.endpoint.EndpointAddress.parseURI(EndpointAddress.java:508)
at net.jxta.endpoint.EndpointAddress.(EndpointAddress.java:192)
at net.jxta.impl.util.URISeedingManager.loadSeeds(URISeedingManager.java:529)
at net.jxta.impl.util.URISeedingManager.refreshActiveSeeds(URISeedingManager.java:360)
at net.jxta.impl.util.URISeedingManager.getActiveSeedRoutes(URISeedingManager.java:283)
at net.jxta.impl.endpoint.relay.RelayClient.run(RelayClient.java:344)
at java.lang.Thread.run(Thread.java:595)

followed by this log:

Aug 23, 2009 3:44:37 PM net.jxta.impl.endpoint.servlethttp.HttpClientMessenger
INFO: New messenger : net.jxta.impl.endpoint.servlethttp.HttpClientMessenger@d09ad3 {http://:80} {http://:80 / jxta://uuid-59616261646162614E50472050325033ED9C33DF7D6F470ABD10CECAE7B64BD203}
Aug 23, 2009 3:44:37 PM net.jxta.impl.endpoint.servlethttp.HttpClientMessenger$MessagePoller run
INFO: Message polling beings for http://:80/uuid-59616261646162614E504720503250333D801C0BC3E54E209594D573...
JXTA Started, connected to rendezvous: false

where connected to rendezvous obviously lists the boolean returned by NetworkManager's waitForRendezvousConnection.
Note: Peers behind firewall which previously allowed the connection to break through, still do. Peers behind
firewalls which previously blocked super peer connection, still do.

My questions are:

a. What is the meaning of the above exception. How would an HTTP URI be formed ?
b. Is that indeed the proper procedure for super peer TCP AND HTTP connection ?

Listed is the client code for network manager's configuration:

HashSet relaySet = new HashSet();
relaySet.add(relayPeerIp);
HashSet rendezvousSet = new HashSet();
rendezvousSet.add(rendezvousIp);
manager_.getConfigurator().setRendezvousSeeds(rendezvousSet);
manager_.getConfigurator().setRelaySeedingURIs(relaySet);
manager_.getConfigurator().setTcpEnabled(true);
manager_.getConfigurator().setTcpIncoming(true);
manager_.getConfigurator().setTcpPort(9721);

manager_.getConfigurator().setHttpOutgoing(true);
manager_.getConfigurator().setHttpEnabled(true);
manager_.getConfigurator().setHttpIncoming(true);
manager_.startNetwork();
boolean connected = manager_.waitForRendezvousConnection(
RENDEZVOUS_TIMEOUT);
System.out.println("JXTA Started, connected to rendezvous: " +
connected);

Listed is the Super peer code for network manager's configuration:

manager_ =
new net.jxta.platform.NetworkManager(
NetworkManager.ConfigMode.SUPER,
"SuperPeer", new File(new File("C:\\superPeer"),
".jxta").toURI());
manager_.getConfigurator().setTcpEnabled(true);
manager_.getConfigurator().setTcpIncoming(true);
manager_.getConfigurator().setTcpPort(superPeerTcpPort_);
manager_.getConfigurator().setHttpPort(superPeerHttpPort_);
manager_.getConfigurator().setHttpEnabled(true);
manager_.getConfigurator().setHttpIncoming(true);
manager_.getConfigurator().setHttpOutgoing(true);
manager_.getConfigurator().setTcpInterfaceAddress(superPeerAddress_);
manager_.getConfigurator().setHttpInterfaceAddress(superPeerAddress_);
manager_.startNetwork();

Thank you very much

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
atr_23
Offline
Joined: 2008-04-14

i think the URIs must have the form of
urn:jxta:uuid-59616261646162614E...

you get this format by peerID.toURI().toString()

godi
Offline
Joined: 2009-07-02

Hello,

Did you solve this problem?

I am having the same issue. I have changed from tcp:// to http:// and I have enabled the Http configuration in the NetworkConfigurator but I cannot manage to connect from and an edge peer to a rendezvous peer.

I would appreciate any help.

godi
Offline
Joined: 2009-07-02

Hello everybody,

I cannot solve this issue.

Any ideas for solving this problem?

Thanks in advance.