[omniORB] WaitingForReply Exception
Jochen Behrens
jochen.behrens@barco.com
Wed Mar 26 13:22:01 2003
Hi folks,
By re-establishing a client - server connection after a server restart a
CommFailure exception with minor code WaitingForReply is raised on
client side.
The client periodically calls a ping method on the server to ensure it
is alive. When killing and restarting the server the client
automatically reconnects to the server. Then the client calls a method
on the server to get an object reference of a further object also
provided by the server. The first call on this reference fails with the
above mentioned exception.
Interestingly enough, after catching the exception a second call on the
same object reference is successful.
See below for the simplified code snipped and the related ORB trace
(level 25)
Client code snippet:
Publisher_var publisher = Publisher::_nil();
try
{
// serverRef points to a remote server object.
publisher = serverRef->get_publisher_logPriority();
}
catch
{
return false;
}
// All is fine up to here
...
try
{ // fails with WaitingForReply
publisher->subscribe(logPriorSubscriber.in());
}
catch (const CORBA::COMM_FAILURE& cf)
{
if (cf.minor() == omni::COMM_FAILURE_WaitingForReply)
{
try
{ // returns successfully
publisher->subscribe(logPriorSubscriber.in());
}
catch (...)
{
....
}
}
...
}
Trace with level = 25:
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: Creating ref to
remote: root<117440512>
target id : IDL:Components/DCPS/Multiple/Publisher:1.0
most derived id: IDL:Components/DCPS/Multiple/Publisher:1.0
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: createLocalObjRef --
reusing reference from local ref list.
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: LocateRequest to
remote: root<117440512>
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: sendChunk: to
giop:tcp:172.16.5.13:5555 38 bytes
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: throw
giopStream::CommFailure from
giopStream.cc:819(0,MAYBE,COMM_FAILURE_WaitingForReply)
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: Client connection
refcount = 0
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: Client close
connection to giop:tcp:172.16.5.13:5555
COMM_FAILURE_WaitingForReply
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: LocateRequest to
remote: root<117440512>
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: Client opened
connection to giop:tcp:172.16.5.13:5555
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: sendChunk: to
giop:tcp:172.16.5.13:5555 38 bytes
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: inputMessage: from
giop:tcp:172.16.5.13:5555 20 bytes
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: send codeset
service context: (ISO-8859-1,UTF-16)
Mar 26 08:50:19 odsfair [30110]: I: <ORB> omniORB: sendChunk: to
giop:tcp:172.16.5.13:5555 248 bytes
Mar 26 08:50:19 odsfair [30260]: I: <ORB> omniORB: Server accepted
connection from giop:tcp:172.16.5.13:36448
Mar 26 08:50:19 odsfair [30275]: I: <ORB> omniORB: giopWorker task execute.
Mar 26
Any ideas are welcome,
Jochen
--
Jochen Behrens
Software Engineer
-----------------------------------
Barco Orthogon AG
Hastedter Osterdeich 222
28207 Bremen
Tel +49 (0) 4 21 - 20 12 2 - 447
Fax +49 (0) 4 21 - 20 12 2 - 999
E-Mail: Jochen.Behrens@barco.com
Internet: www.barco-orthogon.com