Question

I'm using IPMS with Jade for inter-platform agent migration. I'm using Jade 3.6 with IPMS 1.2. I have enabled the services on both slave1 (the original platform) and on slave2 (the target platform). The -accept-foreign-agents true option is also set on both platform. I've increased the timeout settings as well. The code for migration is as follows:

AID remoteAMS = new AID("ams@slave2:1099/JADE", AID.ISGUID);
remoteAMS.addAddresses("http://slave2:7778/acc");
PlatformID destination = new PlatformID(remoteAMS);
agent.doMove(destination);

I was only getting a timeout on slave1 but after enabling detailed logging, I'm getting the following error on slave2:

WARNING: FAILURE-ams-9 - Receiver does not exist.
jade.core.NotFoundException: getContainerID() failed to find agent ams@slave1
    at jade.core.MainContainerImpl.getContainerID(MainContainerImpl.java:1318)
    at jade.core.messaging.MessagingService.deliverInLocalPlatfrom(MessagingService.java:1255)
    at jade.core.messaging.MessagingService.deliverNow(MessagingService.java:1187)
    at jade.core.messaging.MessageManager$Deliverer.run(MessageManager.java:152)
    at java.lang.Thread.run(Thread.java:662)

Any hints on how to debug this?

Was it helpful?

Solution

This problem is caused by not having the proper hostnames set on the platforms. JADE needs to be able to resolve 127.0.0.1 to 'slave1' on host and 'slave2' on target platforms. To fix this problem, I edited my /etc/hosts file and commented out localhost on both systems:

# 127.0.0.1     localhost 
127.0.0.1       slave1 
192.168.56.101  slave2

Same goes for slave2. I've covered this and some other errors in a detailed tutorial here: Agent Mobility with JADE and JIPMS.

OTHER TIPS

The problem could also be caused by running the JADE platform on standard port 1099 which is also used by the JAVA RMI. The same error is received when the port is already in use. You should also check on the hosts file, a free port number on both computers ofcourse and if the parameters are typed correctly of your command which starts the JADE platform. Ofcourse always check your firwall if the desired port which you use for the JADE platform is allowed.

But that is my experience when I installed the plugin and made it work.

By using Jade 4.3.0 with IPMS 2.0 you can easily migrate your agent. What you have to do is to put amm in the remoteAMS AID address for the destination, where you wanna move your agent. like this:

AID remoteAMS = new AID("amm@slave2:1099/JADE", AID.ISGUID);
remoteAMS.addAddresses("http://slave2:7778/acc");

PlatformID destination = new PlatformID(remoteAMS);
agent.doMove(destination);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top