Discussion:
[jade-develop] about usind especific ports numbers
Alternán Carrasco Bustamante
2013-12-10 14:22:49 UTC
Permalink
Hi Giovanni and Jaders, I will be give you a very detailed explanation of
the use of ports because is a very important matter in the develop of the
multi-agent system that I am creating.

I do an analysis with the command netstat, and use specifically the option
?o, that allows to see the process ID associated with every open connection.
I use this option to identify which connection is open by the process of the
JADE platform.

For the case of study I execute 2 agents:

1. The clientAgent send messages to the serverAgent and waits for a
response. PCName == SMAObservatorio

2. The serverAgent receives messages from clientAgent and send a
response for each message received. PCName == OTServer

Each agent is executed in a different PC. The serverAgent deploys the JADE
platform and the clientAgent join to this platform.

In both agents I use the parameter localport, like this:

serverAgent

Profile profile = new ProfileImpl();

profile.setParameter(Profile.CONTAINER_NAME, containerName);

profile.setParameter(Profile.LOCAL_PORT, "5001");



clientAgent

Profile profile = new ProfileImpl();

profile.setParameter(Profile.CONTAINER_NAME, containerName);

profile.setParameter(Profile.MAIN_HOST, hostName);

profile.setParameter(Profile.MAIN_PORT, "1099");

profile.setParameter(Profile.LOCAL_PORT, "5000");



When I executed the agents, this ports 5000 and 5001 are opened, but several
others to, like the 62061.

I send to you the print screens of all of this data.

In the image ?netstat -o. OTServer.png? are the open connection in the PC
OTServer, and I mark to the right the 4 connection that are from the
processID 3364. Process 3364 is the application of java running. This ID can
be confirmed in the image ?process. OTServer.png?.

In similar way, in the images for the PC SMAObservatorio you can see the
mark for the process 1892.

In those images you can see the use of others ports, and they aren?t only
the 1099, 5000 and 5001.

In the PC OTServer, JADE open the ports 20904 and 20906.

In the PC SMAObservatorio, JADE open the ports 62091, 62067, 62070 and
62073.

Perhaps this ports are something related to DF, AMS and RMA agents, or the
agents opened automatically when send and receive messages.

I don?t know for real. And also I don?t know if there is a way to configure
that ports.

I except to be clear in this case of study that I develop, and don?t send
the source code because is simple and don?t have anything that could be a
problem to resolve.

Thanks in advance and sorry if the explanation is too big.

I tried to make a summary, but I think it was longer that I expected.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20131210/b4ee3064/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netstat -o. OTServer.png
Type: application/octet-stream
Size: 15029 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20131210/b4ee3064/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netstat -o. SMAObservatorio.png
Type: application/octet-stream
Size: 10323 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20131210/b4ee3064/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: process. OTServer.png
Type: application/octet-stream
Size: 7898 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20131210/b4ee3064/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: process. SMAObservatorio.png
Type: application/octet-stream
Size: 8611 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20131210/b4ee3064/attachment-0007.obj>
Caire Giovanni
2013-12-12 14:02:18 UTC
Permalink
Hi,

Before any further analysis I need to understand your environment.
From your explanation I understand you have a single platform composed of
- The Main Container (running on host OTServer) holding the serverAgent
- A peripheral container (running on host SMAObservatorio) holding the clientAgent.
Unfortunately the configurations you provided are not consistent with that: the Main Container listens on port 5001 and the peripheral container searches for the main on port 1099. This cannot work!

Can you please clarify?
In order to avoid misunderstandings, I would ask you to refer to the terminology (platform, containers, Main Container, agents ...) defined in the JADE Administration Tutorial (http://jade.tilab.com/doc/tutorials/JADEAdmin/index.html).

Last question: which version of Jade are you using?
Bye,

Giovanni

Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Altern?n Carrasco Bustamante
Inviato: marted? 10 dicembre 2013 15:23
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] about usind especific ports numbers

Hi Giovanni and Jaders, I will be give you a very detailed explanation of the use of ports because is a very important matter in the develop of the multi-agent system that I am creating.
I do an analysis with the command netstat, and use specifically the option -o, that allows to see the process ID associated with every open connection. I use this option to identify which connection is open by the process of the JADE platform.
For the case of study I execute 2 agents:

1. The clientAgent send messages to the serverAgent and waits for a response. PCName == SMAObservatorio

2. The serverAgent receives messages from clientAgent and send a response for each message received. PCName == OTServer
Each agent is executed in a different PC. The serverAgent deploys the JADE platform and the clientAgent join to this platform.
In both agents I use the parameter localport, like this:
serverAgent
Profile profile = new ProfileImpl();
profile.setParameter(Profile.CONTAINER_NAME, containerName);
profile.setParameter(Profile.LOCAL_PORT, "5001");

clientAgent
Profile profile = new ProfileImpl();
profile.setParameter(Profile.CONTAINER_NAME, containerName);
profile.setParameter(Profile.MAIN_HOST, hostName);
profile.setParameter(Profile.MAIN_PORT, "1099");
profile.setParameter(Profile.LOCAL_PORT, "5000");

When I executed the agents, this ports 5000 and 5001 are opened, but several others to, like the 62061.
I send to you the print screens of all of this data.
In the image "netstat -o. OTServer.png" are the open connection in the PC OTServer, and I mark to the right the 4 connection that are from the processID 3364. Process 3364 is the application of java running. This ID can be confirmed in the image "process. OTServer.png".
In similar way, in the images for the PC SMAObservatorio you can see the mark for the process 1892.
In those images you can see the use of others ports, and they aren't only the 1099, 5000 and 5001.
In the PC OTServer, JADE open the ports 20904 and 20906.
In the PC SMAObservatorio, JADE open the ports 62091, 62067, 62070 and 62073.
Perhaps this ports are something related to DF, AMS and RMA agents, or the agents opened automatically when send and receive messages.
I don't know for real. And also I don't know if there is a way to configure that ports.
I except to be clear in this case of study that I develop, and don't send the source code because is simple and don't have anything that could be a problem to resolve.
Thanks in advance and sorry if the explanation is too big.
I tried to make a summary, but I think it was longer that I expected.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20131212/a473349e/attachment.html>
Loading...