Skip to main content

Able to ping within LAN, not able to ping remote

2 replies [Last post]
littledavid2
Offline
Joined: 2008-03-04

I experimenting the sample code in PracticalJXTA. I hit some problem.

I have 4 items set up: Peer A, Peer B, Peer C and Rendezvous R

R is set up to run Rendezvous_Relay. (R is on same LAN as A and B with port 9700 to 9800 opened)
A, B and C runs as Edge.

A and B are on same LAN. C is on another LAN. They are separated by NAT and FW.

1. All A, B and C is able to connect to R via MyNetworkManager.waitForRendezvousConnection successfully.

2. A can "ping" B with the ping code from PracticalJXTA sample.

3. A and B can not "ping" C. and C can not "ping" A or B

4. Question: what should I do to make A and B able to ping C? and via versa.

Any help is much appreciated.

R setting:
=======
NetworkManager MyNetworkManager = new NetworkManager(NetworkManager.ConfigMode.RENDEZVOUS_RELAY,
Name, ConfigurationFile.toURI());

NetworkConfigurator MyNetworkConfigurator = MyNetworkManager.getConfigurator();

// Setting configuration
MyNetworkConfigurator.setTcpPort(9710);
MyNetworkConfigurator.setTcpEnabled(true);
MyNetworkConfigurator.setTcpIncoming(true);
MyNetworkConfigurator.setTcpOutgoing(true);
MyNetworkConfigurator.setUseMulticast(true);

A, B and C setting
==============
MyNetworkManager = new NetworkManager(NetworkManager.ConfigMode.EDGE,
Name, ConfigurationFile.toURI());

NetworkConfigurator MyNetworkConfigurator = MyNetworkManager.getConfigurator();

MyNetworkConfigurator.clearRendezvousSeeds();
MyNetworkConfigurator.clearRelaySeeds();
MyNetworkConfigurator.addRdvSeedingURI(URI.create("tcp://202.xx.xx.xx:9710"));
MyNetworkConfigurator.addRelaySeedingURI(URI.create("tcp://202.xx.xx.xx:9710"));

// Setting Configuration
MyNetworkConfigurator.setTcpPort(TcpPort);
MyNetworkConfigurator.setTcpEnabled(true);
MyNetworkConfigurator.setTcpIncoming(true);
MyNetworkConfigurator.setTcpOutgoing(true);
MyNetworkConfigurator.setUseMulticast(true);

MyNetworkConfigurator.setPeerID(PID); // A or B or C's ID

MyNetworkConfigurator.save();

Ping code in A, B and C
==================
EndpointService MyEndpointService = NetPeerGroup.getEndpointService();
MessageTransport MyMessageTransport = MyEndpointService.getMessageTransport("jxta");

RouteControl MyRouteControl = (RouteControl) MyMessageTransport.transportControl(EndpointRouter.GET_ROUTE_CONTROL, null);

if (MyRouteControl.isConnected(OtherPeerPID)) { // A or B or C's PID
System.out.println("Connected! ");
} else {
System.out.println("Can not connect! ");
}

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

Hi,

i) Can C ping R?

ii) Are you sure C can connect to R?

iii) You have enabled multicasting on A B and C, can you disable it and redo your tests?

iv) See http://forums.java.net/jive/thread.jspa?messageID=301694&#301694 too.

Thanks,

J.

b1053710220
Offline
Joined: 2008-09-02

maybe there should be another Rendezvous R2 in the LAN of C,
you'd better hava a test and show the result.