exat
exat copied to clipboard
Error adding eXAT as remote platform to JADE
Using eXAT's MTP server, I am trying to add an eXAT platform as a remote platform to the JADE agent framework.
-
I start the eXAT with: ./exat.sh platform1 -http_port 7779 -start simple_pingagent
-
eXAT starts, including the print of: ['HTTP-MTP'] MTP Started at port 7779
-
I start JADE with: java -cp lib/jade.jar jade.Boot -gui
-
In JADE, I click "Remote Platforms" -> "Add platform via URL", and type in: http://localhost:7779/acc
-
The eXAT terminal throws an error. This seems to be due to the fact that JADE runs a HTTP GET request, which is not pattern matched by: http_mtp_post ('POST', Url, Headers, Req) -> ...
Here's the error thrown:
=PROGRESS REPORT==== 29-Feb-2012::14:30:39 === application: exat started_at: platform1@mylaptop
=ERROR REPORT==== 29-Feb-2012::14:31:11 === module: misultin_http line: 301 worker crash: {function_clause, [{mtp,http_mtp_post, ['GET', ["acc"], [{'User-Agent',"Java/1.7.0_b147-icedtea"}, {'Host',"localhost:7779"}, {'Accept', "text/html, image/gif, image/jpeg, ; q=.2, */; q=.2"}, {'Connection',"keep-alive"}], {misultin_req, {req,#Port<0.1361>,http, {127,0,0,1}, 43712,undefined,keep_alive,undefined, {1,1}, 'GET', {abs_path,"/acc"}, [], [{'User-Agent',"Java/1.7.0_b147-icedtea"}, {'Host',"localhost:7779"}, {'Accept', "text/html, image/gif, image/jpeg, ; q=.2, */; q=.2"}, {'Connection',"keep-alive"}], <<>>}, <0.87.0>}]}, {misultin_http,call_mfa,2}, {misultin_http,handle_get,2}, {misultin_http,body,2}]}
I believe compatibility has been tested only at the level of simple messages sent between JADE and eXAT. Can you try sending a message programmatically? With something like this:
private void sendMessage() {
AID r = new AID ("the_exat_agent@exatplatform", AID.ISGUID);
r.addAddresses("http://localhost:7779/acc");
ACLMessage aclMessage = new ACLMessage(ACLMessage.REQUEST);
aclMessage.addReceiver(r);
aclMessage.setContent("ping");
this.send(aclMessage);
}
Thanks. I've tried that, and I'm now getting the following error in the eXAT terminal:
=ERROR REPORT==== 29-Feb-2012::17:27:18 === Error in process <0.119.0> on node 'platform1@laptop' with exit value: {{badmatch,{absoluteURI,http,"localhost",7779,"/acc"}},[{misultin_http,headers,4}]}
ACK. I will take a look at it on Sunday
Rob, it looks like some problem in Misultin code (it's hard to trace it exactly without having exactly code to reproduce it). Since Misultin has been discontinued there is no point in trying to fix it. I will replace Misultin with Cowboy and see how it rolls from there on.