[omniORB] Possible bug in TRANSIENT_ handling?

renny.koshy at rubixinfotech.com renny.koshy at rubixinfotech.com
Thu Jan 13 17:50:13 GMT 2005


I noticed a problem during some of our testing with server / host failure 
etc.

Please help out if possible...

Thank you

Renny
===========================================================

We have a piece of code that looks as follows:

~~~~~~~~~~~~~~~~~~~~~~~`
      CORBA::Object_var obj = ORB->string_to_object(objName);

      if (CORBA::is_nil(obj))
                  {
                         Logger->debug("Can't narrow reference to type (or 
it was nil).");
                  }
                else
                  {
                         omniORB::setClientCallTimeout(obj.in(), 2000);
                  }

      while (Retries--)
                  {
                         try 
                                {
                                  Mgr = 
TRADE::CallRecord::Manager::_narrow(obj);
                                  omniORB::setClientCallTimeout(Mgr, 
CDRManagerTimeout);
                                  break;
                                }
                         catch(CORBA::TRANSIENT & ex) 
                                {
                                }
                         catch(CORBA::COMM_FAILURE& ex) 
                                {
                                }
                        ....
                }

~~~~~~~~~~~~~~~~~~~~~~~`

When we use alternate URI's.... and switch off the PRIMARY (10.100.0.20) 
server, a client running on the secondary server keeps doing the 
following, instead for connecting to the process on the secondary server 
(10.100.0.11).  Is this a bug? 

When the PRIMARY server is running, but the primary process is dead, it 
IMMEDIATELY switches to the secondary process, and works okay.  Any help 
on this?

2005-01-13 17:36:52,959 DEBUG main CallRec [001:02] - Attempting to 
connect to 'corbaloc::1.2 at 10.100.0.20:8200,:1.2 at 10.
100.0.11:8200/CDRManager'

omniORB: Creating ref to remote: key<0x4344524d616e61676572>
 target id      : IDL:omg.org/CORBA/Object:1.0
 most derived id:
omniORB: Client attempt to connect to giop:tcp:10.100.0.20:8200
omniORB: Scan for idle connections (1105655814,178979807)
omniORB: Scavenger reduce idle count for strand c85fa8 to 20
omniORB: Scavenger reduce idle count for strand ca1280 to 19
omniORB: Scan for idle connections done (1105655814,178979807).
omniORB: throw giopStream::CommFailure from 
giopStream.cc:1070(1,NO,TRANSIENT_ConnectFailed)
omniORB: Client attempt to connect to giop:tcp:10.100.0.11:8200
omniORB: throw giopStream::CommFailure from 
giopStream.cc:1070(0,NO,TRANSIENT_ConnectFailed)
omniORB: throw TRANSIENT from omniObjRef.cc:759 
(NO,TRANSIENT_ConnectFailed)

2005-01-13 17:36:54,973 DEBUG main CallRec [001:02] - Primary Channel - 
Caught system exception TRANSIENT -- unable to
contact the object (ConnectToCDRManager).

omniORB: Client attempt to connect to giop:tcp:10.100.0.20:8200
omniORB: throw giopStream::CommFailure from 
giopStream.cc:1070(1,NO,TRANSIENT_ConnectFailed)
omniORB: Client attempt to connect to giop:tcp:10.100.0.11:8200
omniORB: throw giopStream::CommFailure from 
giopStream.cc:1070(0,NO,TRANSIENT_ConnectFailed)
omniORB: throw TRANSIENT from omniObjRef.cc:759 
(NO,TRANSIENT_ConnectFailed)

2005-01-13 17:36:56,980 DEBUG main CallRec [001:02] - Primary Channel - 
Caught system exception TRANSIENT -- unable to
contact the object (ConnectToCDRManager).

****************** WORKAROUND ********************

The work around that I've used is to put a "transient counter" and if I 
get 2 transients, then I switch the order of the servers in the URI, and 
then it works... as shown below:

2005-01-13 17:36:56,981 ERROR main CallRec [001:02] - Too many TRANSIENT 
errors when attempting to connect to CDR Manager -- swapping

omniORB: Creating ref to remote: key<0x4344524d616e61676572>
 target id      : IDL:omg.org/CORBA/Object:1.0
 most derived id:
omniORB: omniRemoteIdentity deleted.
omniORB: ObjRef() -- deleted.
omniORB: Client attempt to connect to giop:tcp:10.100.0.11:8200
omniORB: Client opened connection to giop:tcp:10.100.0.11:8200
omniORB: sendChunk: to giop:tcp:10.100.0.11:8200 93 bytes
omniORB:
4749 4f50 0102 0000 0000 0051 0000 0002 GIOP.......Q....
0300 0000 0000 b598 0000 000a 4344 524d ............CDRM
616e 6167 6572 228c 0000 0006 5f69 735f anager"....._is_
6100 b598 0000 0000 0000 0021 4944 4c3a a..........!IDL:
5452 4144 452f 4361 6c6c 5265 636f 7264 TRADE/CallRecord
2f4d 616e 6167 6572 3a31 2e30 00        /Manager:1.0.
omniORB: inputMessage: from giop:tcp:10.100.0.11:8200 25 bytes
omniORB:
4749 4f50 0102 0001 0000 000d 0000 0002 GIOP............
0000 0000 0000 0000 01                  .........
omniORB: Creating ref to remote: key<0x4344524d616e61676572>
 target id      : IDL:TRADE/CallRecord/Manager:1.0
 most derived id:
omniORB: ObjRef() -- deleted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20050113/a9913856/attachment.htm


More information about the omniORB-list mailing list