JADE在代理调用时在64Bit Linux上执行时挂起

时间:2014-08-13 01:56:30

标签: linux ubuntu-12.04 agents-jade

我有一个讨厌的问题,我希望我可以请求社区的一些帮助....

我有一个Ubuntu 12.04LTS 64位linux 服务器,我在其上运行一个 JADE (没有gui)的实例,它创建一个容器并连接到主RMA上我的本地机器就好了。我看到容器弹出,生活很美好。问题是当我使用代理重新调用同一个实例时 - 它挂起。注意:我已经在64Bit计算机上重新编译了PingAgent示例,其中包含与我的工作站(Windows)相同的Java(8)。这是32比64位的事情还是在Linux上有Jade的问题?

非常感谢任何协助......

以下是详情:

好实例 (没有代理,没有挂起):

生成

versaggi@drools:/usr/local/jade$ java -classpath lib/jade.jar:classes jade.Boot -container -local-host 50.116.61.17 -host versaggi.game-host.org -port 1099

结果

Aug 12, 2014 7:35:42 PM jade.core.Runtime beginContainer 
INFO: ---------------------------------- 
    This is JADE 4.3.2 - revision 6708 of 2014/03/28 15:19:44 
    downloaded in Open Source, under LGPL restrictions, 
    at http://jade.tilab.com/
---------------------------------------- 
Aug 12, 2014 7:35:42 PM jade.imtp.leap.LEAPIMTPManager initialize 
INFO: Listening for intra-platform commands on address: 
- jicp://50.116.61.17:1099 

Aug 12, 2014 7:35:43 PM jade.core.BaseService init 
INFO: Service jade.core.management.AgentManagement initialized 
Aug 12, 2014 7:35:43 PM jade.core.BaseService init 
INFO: Service jade.core.messaging.Messaging initialized 
Aug 12, 2014 7:35:43 PM jade.core.BaseService init 
INFO: Service jade.core.resource.ResourceManagement initialized 
Aug 12, 2014 7:35:43 PM jade.core.BaseService init 
INFO: Service jade.core.mobility.AgentMobility initialized 
Aug 12, 2014 7:35:43 PM jade.core.BaseService init 
INFO: Service jade.core.event.Notification initialized 
Aug 12, 2014 7:35:43 PM jade.core.AgentContainerImpl joinPlatform 
INFO: -------------------------------------- 
Agent container Container-7@50.116.61.17 is ready. 
-------------------------------------------- 

错误的实例 (调用中包含的代理,挂起......)

versaggi@drools:/usr/local/jade$ java -classpath lib/jade.jar:classes jade.Boot -container -local-host 50.116.61.17 -host versaggi.game-host.org -port 1099  -**agents** ping1:examples.PingAgent.PingAgent


Aug 12, 2014 7:34:25 PM jade.core.Runtime beginContainer 
INFO: ---------------------------------- 
    This is JADE 4.3.2 - revision 6708 of 2014/03/28 15:19:44 
    downloaded in Open Source, under LGPL restrictions, 
    at http://jade.tilab.com/
---------------------------------------- 
Aug 12, 2014 7:34:25 PM jade.imtp.leap.LEAPIMTPManager initialize 
INFO: Listening for intra-platform commands on address: 
- jicp://50.116.61.17:1099 

Aug 12, 2014 7:34:26 PM jade.core.BaseService init 
INFO: Service jade.core.management.AgentManagement initialized 
Aug 12, 2014 7:34:26 PM jade.core.BaseService init 
INFO: Service jade.core.messaging.Messaging initialized 
Aug 12, 2014 7:34:26 PM jade.core.BaseService init 
INFO: Service jade.core.resource.ResourceManagement initialized 
Aug 12, 2014 7:34:26 PM jade.core.BaseService init 
INFO: Service jade.core.mobility.AgentMobility initialized 
Aug 12, 2014 7:34:26 PM jade.core.BaseService init 
INFO: Service jade.core.event.Notification initialized 

**< *** HANGS HERE ***>** 

**< *** KILLED FROM RAM HERE ***>**

Aug 12, 2014 7:34:36 PM jade.imtp.leap.NodeSkel executeCommand 
WARNING: Error serving H-Command jade.core.management.AgentManagement/8: java.lang.NullPointerException 
Aug 12, 2014 7:34:36 PM jade.core.messaging.MessageManager shutdown 
INFO: MessageManager shutting down ... 
Aug 12, 2014 7:34:36 PM jade.core.Runtime$1 run 
INFO: JADE is closing down now. 

1 个答案:

答案 0 :(得分:0)

我已确定问题的根源,但一个解决方案,很可能是因为解决方案可能不存在此问题。

JADE容器最终会及时完成(超时后),但代理将不会被实例化(请参阅下面的粗体错误消息)。

问题是我在私有地址10.0.0.12端口1099上的防火墙后面的本地PC上实例化主容器。远程容器在公共Linux服务器上实例化,该服务器实际上通过一个正确连接到我的本地PC在我的本地路由器中将1099规则的端口转发到10.0.0.12的IP。

出现了真正的问题,因为主容器控制远程容器,因此代理通信规定代理通信必须通过10.0.0.12端口1099并将其传送到公共Linux服务器上的远程容器,该服务器立即尝试通过10.0.0.12端口1099实例化代理通信....并因此超时。

在调用JAVA调用时,选项“-host 24.228.171.118 -port 1099”实际指向我的路由器,它执行端口转发 - 它不是启动主容器的PC的IP。

看来这个特殊的设置并不能很好地发挥作用......

你在这里看到了问题......

如果有配置选项我可以用来改变这个(任何人都知道)我会很感激....

versaggi@drools:/usr/local/jade$ java -classpath lib/jade.jar:classes jade.Boot -container -local-host 50.116.61.17 -host 24.228.171.118 -port 1099  -agents ping1:examples.PingAgent.PingAgent

Aug 13, 2014 1:08:20 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.3.2 - revision 6708 of 2014/03/28 15:19:44
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
Aug 13, 2014 1:08:21 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://50.116.61.17:1099

Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized

  • 2014年8月13日下午1:12:36 jade.core.AgentContainerImpl startBootstrapAgents

    严重:无法创建代理ping1:远程对象无法访问 - 导致 by:ICPException发送命令来解决 jicp://10.0.0.12:1099 即可。 - 引起:创建连接时出错。 - 引起:连接超时

Aug 13, 2014 1:12:36 PM jade.core.AgentContainerImpl joinPlatform
INFO: --------------------------------------
Agent container Container-3@50.116.61.17 is ready.
--------------------------------------------

相关问题