移植CERTI解决terminate called after throwing an instance of 'certi::NetworkError'


编译完了CERTI后,由于我们搞嵌入式版本的CERTI,需要把它移植到MIPS平台。移植过程中遇到如下的问题。


terminate called after throwing an instance of 'certi::NetworkError'


这个问题描述不完整需要加入环境变量详细解释。

export CERTI_EXCEPTION=X

加入的环境变量如上。

此后详细的报错出来了:

CERTI Billard 3.4.0HLALOG - 1359602652.161814  - /home/zchx/Documents/CERTI-3.4.0-Source/libCERTI/Exception.cc> CERTI::Exception [NetworkError - reason=gethostbyname gave NULL answer for hostname <RS-NET> with error <Success>RTIA:: RTIA has thrown NetworkError exception.RTIA:: Reason: gethostbyname gave NULL answer for hostname <RS-NET> with error <Success>RTIA:: End execution.UN Socket(RecevoirUN) : : Connection reset by peerHLALOG - 1359602652.181606 LibRTI::UnjoinedFederate - /home/zchx/Documents/CERTI-3.4.0-Source/libCERTI/Exception.cc> CERTI::Exception [NetworkError - reason=Error while receiving UN message.libRTI: exception: NetworkError (read)Billard::main: RTI exception: RTIinternalError [libRTI: Network Read Error waiting RTI reply].Exiting.

此问题在运行rtig 和 加载rtia时均存在。

通过搜索网络后发现只需要修改

/etc/hosts及可。

修改如下

127.0.0.1 RS-NET RS-NET.localhost localhost.localdomain localhost4 localhost4.localdomain4 
::1 RS-NET RS-NET.locahost localhost.localdomain  localhost6 localhost6.localdomain6

注意RS-NET为你的平台名字。


建议的环境变量如下:

export PATH=/zchx/CERTI:$PATH
export CERTI_HOST=172.16.1.179
export CERTI_HOME=/zchx/CERTI:$CERTI_HOME 
export CERTI_FED=/zchx/CERTI:$CERTI_FED
export CERTI_HTTP_PROXY=""
export CERTI_TCP_PORT=8808:$CERTI_TCP_PORT
export CERTI_UDP_PORT=50000:$CERTI_UDP_PORT
  

windows下的环境变量推荐:


你可能感兴趣的:(移植CERTI解决terminate called after throwing an instance of 'certi::NetworkError')