Alternán Carrasco Bustamante
2013-12-10 14:22:49 UTC
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>
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>