[omniORB] Using Bidirectional and Nat

Scott Robertson srobertson at codeit.com
Mon Mar 29 12:55:07 BST 2004


I'm trying to use BiDirectional GIOP to support client callbacks on
machines that are behind a NAT firewall. I think I have everything
configured properly. On the server side I've told it to accept
connections, I added a server transport rule and changed the POA policy
of the object to BiDirPolicy.BOTH. I've done the appropriate setting on
the client as well.

In the log file from the server I see:

omniORB: Accepted request from giop:tcp:192.168.0.91:52363 to switch to
bidirectional because of this rule: "* unix,tcp,bidir"

Which looks good, but when it  tries to make the client call back it 
looks like it's trying to open a brand new connection.

omniORB: Client attempt to connect to giop:tcp:172.16.170.128:32789

Which then throws a TRANSIENT error because the server does not know how
to route to 172.16.170.129 (That's the address behind the firewall). 

Shouldn't it try to use 192.168.91:52363 to make the callback? Or am is
this not what BiDirectional GIOP is used for?

For reference here's the log output at traceLevel 25

omniORB: Read from configuration file "/etc/omniORB.cfg".
omniORB: Distribution date: Fri Nov 21 17:39:25 GMT 2003 dgrisby
omniORB: My addresses are: 
omniORB: 127.0.0.1
omniORB: 192.168.0.77
omniORB: 192.168.123.1
omniORB: Maximum supported GIOP version is 1.2
omniORB: Native char code sets: ISO-8859-1 UTF-8.
omniORB: Transmission char code sets: ISO-8859-1(1.2) ISO-8859-1(1.1)
ISO-8859-1(1.0) UTF-8(1.2).
omniORB: Native wide char code sets: UTF-16.
omniORB: Transmission wide char code sets: UTF-16(1.2).
omniORB: Initialising omniDynamic library.
omniORB: Current configuration is as follows:
omniORB:   
omniORB:   
omniORB:   
omniORB:   
omniORB:   
omniORB:   
omniORB:   DefaultInitRef (file) = 
omniORB:   DefaultInitRef (args) = 
omniORB:   InitRef = NameService=corbaname::192.168.0.77:49000
omniORB:   abortOnInternalError = 0
omniORB:   acceptBiDirectionalGIOP = 1
omniORB:   acceptMisalignedTcIndirections = 0
omniORB:   bootstrapAgentHostname = 
omniORB:   bootstrapAgentPort = 900
omniORB:   clientCallTimeOutPeriod = 0
omniORB:   clientTransportRule = * unix,tcp,bidir
omniORB:   diiThrowsSysExceptions = 0
omniORB:   dumpConfiguration = 0
omniORB:   endPoint = giop:tcp::
omniORB:   endPointPublishAllIFs = 0
omniORB:   giopMaxMsgSize = 2097152
omniORB:   giopTargetAddressMode = KeyAddr
omniORB:   id = omniORB4
omniORB:   inConScanPeriod = 180
omniORB:   lcdMode = 0
omniORB:   maxGIOPConnectionPerServer = 5
omniORB:   maxGIOPVersion = 1.2
omniORB:   maxInterleavedCallsPerConnection = 5
omniORB:   maxServerThreadPerConnection = 100
omniORB:   maxServerThreadPoolSize = 100
omniORB:   nativeCharCodeSet = ISO-8859-1
omniORB:   nativeWCharCodeSet = UTF-16
omniORB:   objectTableSize = 0
omniORB:   offerBiDirectionalGIOP = 0
omniORB:   omniORB_27_CompatibleAnyExtraction = 0
omniORB:   oneCallPerConnection = 1
omniORB:   outConScanPeriod = 120
omniORB:   poaHoldRequestTimeout = 0
omniORB:   poaUniquePersistentSystemIds = 1
omniORB:   principal = [Null]
omniORB:   scanGranularity = 5
omniORB:   serverCallTimeOutPeriod = 0
omniORB:   serverTransportRule = * unix,tcp,bidir
omniORB:   strictIIOP = 1
omniORB:   supportBootstrapAgent = 0
omniORB:   supportCurrent = 1
omniORB:   supportPerThreadTimeOut = 0
omniORB:   tcAliasExpand = 0
omniORB:   threadPerConnectionLowerLimit = 9000
omniORB:   threadPerConnectionPolicy = 1
omniORB:   threadPerConnectionUpperLimit = 10000
omniORB:   threadPoolWatchConnection = 1
omniORB:   traceInvocations = 0
omniORB:   traceLevel = 25
omniORB:   traceThreadId = 0
omniORB:   unixTransportDirectory = /tmp/omni-%u
omniORB:   unixTransportPermission =  777
omniORB:   useTypeCodeIndirections = 1
omniORB:   verifyObjectExistsAndType = 1
omniORB: omniORBpy distribution date: Fri Nov 21 17:42:54 GMT 2003
dgrisby
omniORB: Python thread state scavenger start.
omniORB: Initialising incoming endpoints.
omniORB: Bind to address 0.0.0.0.
omniORB: Starting serving incoming endpoints.
omniORB: Adding root/BiDirPOA<0> (activating) to object table.
omniORB: State root/BiDirPOA<0> (activating) -> active
omniORB: Reusing Python state for thread id 16384
omniORB: Creating ref to local: root/BiDirPOA<0>
 target id      : IDL:omg.org/CORBA/Object:1.0
 most derived id: IDL:Example/Echo:1.0
omniORB: Creating Python ref to local: root/BiDirPOA<0>
 target id      : IDL:Example/Echo:1.0
 most derived id: IDL:Example/Echo:1.0
omniORB: ObjRef(IDL:Example/Echo:1.0) -- deleted.
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 1
omniORB: giopRendezvouser task execute for giop:tcp:192.168.0.77:37735
omniORB: Server accepted connection from giop:tcp:192.168.0.91:52363
omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 2
omniORB: Scavenger task execute.
omniORB: AsyncInvoker: thread id = 4 has started. Total threads = 3
omniORB: giopWorker task execute.
omniORB: Accepted connection from giop:tcp:192.168.0.91:52363 because of
this rule: "* unix,tcp,bidir"
omniORB: inputMessage: from giop:tcp:192.168.0.91:52363 47 bytes
omniORB: Handling a GIOP LOCATE_REQUEST.
omniORB: sendChunk: to giop:tcp:192.168.0.91:52363 20 bytes
omniORB: inputMessage: from giop:tcp:192.168.0.91:52363 292 bytes
omniORB:  recieve codeset service context and set TCS to
(ISO-8859-1,UTF-16)
omniORB:  receive bidir IIOP service context: ( 172.16.170.128:32789 )
omniORB: Accepted request from giop:tcp:192.168.0.91:52363 to switch to
bidirectional because of this rule: "* unix,tcp,bidir"
omniORB: Creating new Python state for thread id 65541
omniORB: Creating Python ref to remote: root/BiDirPOA<0>
 target id      : IDL:Example/CallBack:1.0
 most derived id: IDL:Example/CallBack:1.0
omniORB:  send codeset service context: (ISO-8859-1,UTF-16)
omniORB: Client attempt to connect to giop:tcp:172.16.170.128:32789
omniORB: throw giopStream::CommFailure from
giopStream.cc:1070(0,NO,TRANSIENT_ConnectFailed)
omniORB: throw TRANSIENT from omniObjRef.cc:759
(NO,TRANSIENT_ConnectFailed)
omniORB: omniRemoteIdentity deleted.
omniORB: ObjRef(IDL:Example/CallBack:1.0) -- deleted.
omniORB: throw TRANSIENT from pyExceptions.cc:142
(NO,TRANSIENT_ConnectFailed)
omniORB: sendChunk: to giop:tcp:192.168.0.91:52363 68 bytes
omniORB: throw giopStream::CommFailure from
giopStream.cc:828(0,NO,COMM_FAILURE_UnMarshalArguments)
omniORB: Server connection refcount = 1
omniORB: Server connection refcount = 0
omniORB: Server close connection from giop:tcp:192.168.0.91:52363
omniORB: AsyncInvoker: thread id = 4 has exited. Total threads = 3
omniORB: Deleting Python state for thread id 65541 (thread exit)
omniORB: Scanning Python thread states.
Traceback (most recent call last):
  File "server.py", line 62, in ?
    orb.run()
  File "/usr/lib/python2.3/site-packages/CORBA.py", line 501, in run
    
KeyboardInterrupt
omniORB: ObjRef(IDL:Example/Echo:1.0) -- deleted.
omniORB: ORB not destroyed; no final clean-up.





More information about the omniORB-list mailing list