C++ CORBA (ACE/TAO) 问题
我使用 ACE TAO 作为 CORBA 实现。我想知道是否有人知道设置最大消息大小和最大连接数的任何选项。
omniORB
有两个选项:giopMaxMsgSize
和 maxGIOPConnectionPerServer
。
即使 TAO 有 ORBMaxMessageSize
和 ORBLingerTimeout
,它也会导致我的服务器崩溃。我什至不知道这些是否是正确的选择。
这就是 TAO 调试输出的内容。
TAO (30232|3086943952) ORB_Core: Unable to initialize Codeset Manager
TAO (30232|3086943952) - Completed initializing the process-wide service context
TAO (30232|3086943952) - Default ORB services initialization begins
TAO (30232|3086943952) - Default ORB services initialization completed
TAO (30232|3086943952) - We are the default ORB ...
TAO (30232|3086943952) - Initializing the orb-specific services
TAO (30232|3086943952) - Setting primary connection timeout hook
TAO (30232|3086943952) - Default_Resource_Factory - unable to find codeset manager factory.
TAO (30232|3086943952) - ORB_Core: Codeset Manager not available
TAO (30232|3086943952) - Loaded default protocol <IIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <UIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <SHMIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <DIOP_Factory>
TAO (30232|3086943952) - Created new ORB <>
TAO (30232|3086943952) - Transport_Cache_Manager_T::purge, Cache size after purging is [0]
TAO (30232|3086943952) - IIOP_Connector::begin_connection, to <wnpcls.econz.co.nz:4000> which should block
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, transport [171625212], Connection not complete.
TAO (30232|3086943952) - Transport_Cache_Manager_T::bind_i, Transport[171625212] @ hash:index{-1408233282:0}
TAO (30232|3086943952) - Transport_Cache_Manager_T::bind_i: Success Transport[171625212] @ hash:index{-1408233282:0}. Cache size is [1]
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, going to wait for connection completion on transport[171625212]
TAO (30232|3086943952) - Leader_Follower[171625212]::wait_for_event, (leader) enter reactor event loop
TAO (30232|3086943952) - IIOP_Connection_Handler::open, The local addr is <172.16.1.30:46404>
TAO (30232|3086943952) - IIOP_Connection_Handler::open, IIOP connection to peer <172.16.1.30:4000> on 6
TAO (30232|3086943952) - Leader_Follower[171625212]::wait_for_event, (leader) exit reactor event loop
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, transport [6], wait done result = 1
TAO (30232|3086943952) - IIOP_Connector::make_connection, new connected connection to <wnpcls.econz.co.nz:4000> on Transport[6]
TAO (30232|3086943952) - Transport[6]::register_handler
TAO (30232|3086943952) - Transport_Connector::connect, opening Transport[6] in TAO_CLIENT_ROLE
TAO (30232|3086943952) - Transport_Connector::connect, got an existing connected Transport[6] in role TAO_CLIENT_ROLE
TAO (30232|3086943952) - Muxed_TMS[6]::request_id, <1>
(30232|3086943952) Error in writing request header
TAO (30232|3086943952) - Transport[6]::generate_request_header, error while marshalling the Request header
TAO (30232|3086943952) - Transport[6]::make_idle
TAO (30232|3086943952) - IIOP_Acceptor::open, address==:4011, options=(null)
TAO (30232|3086943952) - Transport_Connector::connect, got an existing connected Transport[6] in role TAO_CLIENT_ROLE
TAO (30232|3086943952) - Muxed_TMS[6]::request_id, <2>
(30232|3086943952) Error in writing request header
TAO (30232|3086943952) - Transport[6]::generate_request_header, error while marshalling the Request header
TAO (30232|3086943952) - Transport[6]::make_idle
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, purging entry from cache
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, removing from the reactor
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, cancel all timers
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Destroying ORB <>
我使用的代码如下:
#define SC_MAX_SIZE (1024*1024*4)
char *corbaARGV[12] = { argv[0] };
int args = 1;
char msize[16];
snprintf(msize, sizeof(msize), "%d", SC_MAX_SIZE);
corbaARGV[args + 0] = "-ORBMaxMessageSize";
corbaARGV[args + 1] = strdup(msize);
args += 2;
int timeout = config().GetInteger("Corba_TimeOuts");
mainlog << notice << "CORBA timeout = " << timeout << " seconds." << endl;
char stimeout[16];
snprintf(stimeout, sizeof(stimeout), "%d", timeout);
corbaARGV[args + 0] = "-ORBLingerTimeout";
corbaARGV[args + 1] = strdup(stimeout);
args += 2;
以上两个都不起作用。
现在我还在 TAO/tests/Oneway_Timeouts 中遇到了使用这些策略的测试示例。有人可以解释一下 RELATIVE_RT_TIMEOUT_POLICY_TYPE、CONNECTION_TIMEOUT_POLICY_TYPE、BUFFERING_CONSTRAINT_POLICY_TYPE 吗?
我似乎找不到任何有关这些的文档。
I'm using ACE TAO as the CORBA implementation. I would like to find out if anyone know of any options to set Maximum Message Size and Maximum number of Connections.
omniORB
has two options for these, giopMaxMsgSize
and maxGIOPConnectionPerServer
.
Even though TAO has ORBMaxMessageSize
and ORBLingerTimeout
it causes my server to crash. I don't even know if these are the right options.
This is what the TAO debug output says.
TAO (30232|3086943952) ORB_Core: Unable to initialize Codeset Manager
TAO (30232|3086943952) - Completed initializing the process-wide service context
TAO (30232|3086943952) - Default ORB services initialization begins
TAO (30232|3086943952) - Default ORB services initialization completed
TAO (30232|3086943952) - We are the default ORB ...
TAO (30232|3086943952) - Initializing the orb-specific services
TAO (30232|3086943952) - Setting primary connection timeout hook
TAO (30232|3086943952) - Default_Resource_Factory - unable to find codeset manager factory.
TAO (30232|3086943952) - ORB_Core: Codeset Manager not available
TAO (30232|3086943952) - Loaded default protocol <IIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <UIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <SHMIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <DIOP_Factory>
TAO (30232|3086943952) - Created new ORB <>
TAO (30232|3086943952) - Transport_Cache_Manager_T::purge, Cache size after purging is [0]
TAO (30232|3086943952) - IIOP_Connector::begin_connection, to <wnpcls.econz.co.nz:4000> which should block
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, transport [171625212], Connection not complete.
TAO (30232|3086943952) - Transport_Cache_Manager_T::bind_i, Transport[171625212] @ hash:index{-1408233282:0}
TAO (30232|3086943952) - Transport_Cache_Manager_T::bind_i: Success Transport[171625212] @ hash:index{-1408233282:0}. Cache size is [1]
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, going to wait for connection completion on transport[171625212]
TAO (30232|3086943952) - Leader_Follower[171625212]::wait_for_event, (leader) enter reactor event loop
TAO (30232|3086943952) - IIOP_Connection_Handler::open, The local addr is <172.16.1.30:46404>
TAO (30232|3086943952) - IIOP_Connection_Handler::open, IIOP connection to peer <172.16.1.30:4000> on 6
TAO (30232|3086943952) - Leader_Follower[171625212]::wait_for_event, (leader) exit reactor event loop
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, transport [6], wait done result = 1
TAO (30232|3086943952) - IIOP_Connector::make_connection, new connected connection to <wnpcls.econz.co.nz:4000> on Transport[6]
TAO (30232|3086943952) - Transport[6]::register_handler
TAO (30232|3086943952) - Transport_Connector::connect, opening Transport[6] in TAO_CLIENT_ROLE
TAO (30232|3086943952) - Transport_Connector::connect, got an existing connected Transport[6] in role TAO_CLIENT_ROLE
TAO (30232|3086943952) - Muxed_TMS[6]::request_id, <1>
(30232|3086943952) Error in writing request header
TAO (30232|3086943952) - Transport[6]::generate_request_header, error while marshalling the Request header
TAO (30232|3086943952) - Transport[6]::make_idle
TAO (30232|3086943952) - IIOP_Acceptor::open, address==:4011, options=(null)
TAO (30232|3086943952) - Transport_Connector::connect, got an existing connected Transport[6] in role TAO_CLIENT_ROLE
TAO (30232|3086943952) - Muxed_TMS[6]::request_id, <2>
(30232|3086943952) Error in writing request header
TAO (30232|3086943952) - Transport[6]::generate_request_header, error while marshalling the Request header
TAO (30232|3086943952) - Transport[6]::make_idle
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, purging entry from cache
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, removing from the reactor
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, cancel all timers
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Destroying ORB <>
Code I'm using is as follows:
#define SC_MAX_SIZE (1024*1024*4)
char *corbaARGV[12] = { argv[0] };
int args = 1;
char msize[16];
snprintf(msize, sizeof(msize), "%d", SC_MAX_SIZE);
corbaARGV[args + 0] = "-ORBMaxMessageSize";
corbaARGV[args + 1] = strdup(msize);
args += 2;
int timeout = config().GetInteger("Corba_TimeOuts");
mainlog << notice << "CORBA timeout = " << timeout << " seconds." << endl;
char stimeout[16];
snprintf(stimeout, sizeof(stimeout), "%d", timeout);
corbaARGV[args + 0] = "-ORBLingerTimeout";
corbaARGV[args + 1] = strdup(stimeout);
args += 2;
None of the above two works.
Now I also came across a test sample in TAO/tests/Oneway_Timeouts that uses the policies. Can someone shed some light about RELATIVE_RT_TIMEOUT_POLICY_TYPE, CONNECTION_TIMEOUT_POLICY_TYPE, BUFFERING_CONSTRAINT_POLICY_TYPE.
I can't seem to find any documentation about these.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论