I have expertise in using Jade in the same host (my laptop) as I can handle all interactions between agents;
But I have to run the MainContainer
in my laptop and the second container in a Raspberry Pi.
I started to try a simple example by creating 2 agents, the first on the main container and the second on the container that will run on Raspberry Pi. But it doesn't work.
the following code is for the main container including agent1 which will send message to agent2
Runtime runtime = Runtime.instance();
Properties properties = new ExtendedProperties();
properties.setProperty(Profile.GUI, "true");
Profile profile = new ProfileImpl(properties);
AgentContainer agentContainer1=runtime.createMainContainer(profile);
Container.start();
AgentController agent1=agentContainer1.createNewAgent("Agent1","Connexion.Agent1",new Object[]{});
agent1.start();
Code of the second container:
Runtime runtime=Runtime.instance();
Profile profile=new ProfileImpl();
profile.setParameter(profile.MAIN_HOST, "192.168.0.164"); //Raspberry Pi host
AgentContainer agentContainer1=runtime.createAgentContainer(profile);
AgentController agent2=agentContainer1.createNewAgent("Agent2","Connexion.Agent2",new Object[]{});
agent2.start();
agentContainer1.start();
- agent1 send message to agent2 every 15seconds.
There isn't any problem with the main container code but when I run the raspberry container using deployAndBrickPun
(ev3dev-lang-java
), it show me the following error:
> Task :deploy
Host key checking is off. It may be vulnerable to man-in-the-middle attacks.
ev3dev#1|Sep 20, 2021 1:27:00 PM jade.core.AgentContainerImpl joinPlatform
ev3dev#1|SEVERE: Some problem occurred while joining agent platform.
ev3dev#1|jade.core.ProfileException: Can't get a proxy to the Platform Manager - Caused by: Dispatcher error - Caused by: DispatcherException in remote site. No skeleton for object-id0
ev3dev#1| at jade.core.ProfileImpl.createPlatformManager(ProfileImpl.java:529)
ev3dev#1| at jade.core.ProfileImpl.getPlatformManager(ProfileImpl.java:442)
ev3dev#1| at jade.core.ProfileImpl.getServiceManager(ProfileImpl.java:456)
ev3dev#1| at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:347)
ev3dev#1| at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:495)
ev3dev#1| at jade.core.Runtime.createAgentContainer(Runtime.java:127)
ev3dev#1| at Connexion.Container1.main(Container1.java:17)
I need to solve this errors, so I asking for your help please;
Thank you in advance.