[omniORB] Issues with persistent objects

Martin B. 0xCDCDCDCD at gmx.at
Fri Jan 28 11:59:01 GMT 2011


Analysis will be easier when you add traceException=1 (The minor codes 
of the exceptions should be apparent then.) and when you use the same 
extensive tracing parameters for the server side as you already use for 
the client side.

cheers,
Martin

On 28.01.2011 05:23, anirudh nair wrote:
> Hi,
>
> I created a persistent object using omniINSPOA and setting the endPoint
> parameter suitably.
> The object is persistent as I get the same IOR when the server restarts.
>
> Now, when the client calls a method after a server restart, a
> COMM_FAILURE exception
> is raised. The interesting thing here is that when the client catches
> the exception and issues
> another call to server, the server method is executed.
>
> So, basically only the first call after the server restart raises an
> exception. All calls henceforth
> works fine.
>
>
> if the below code is executed after  server restarts.
> try {
> return obj_ref->send_book(the_book, key); // this raises an exception
> }
> catch(...) {
> cerr << "Exception Caught" << endl;
> return  obj_ref->send_book(the_book, key); // this call works fine
> }
>
> In the above code send_book is the server method called by the client.
>
>
> client trace:
> omniORB: (0) 2011-01-27 20:52:17.319000: Version: 4.1.2
> omniORB: (0) 2011-01-27 20:52:17.321000: Distribution date: Thu Feb 14
> 14:19:08
> GMT 2008 dgrisby
> omniORB: (0) 2011-01-27 20:52:17.383000: My addresses are:
> omniORB: 192.168.198.1
> omniORB: 192.168.68.1
> omniORB: 10.9.19.20
> omniORB: 127.0.0.1
> omniORB: (0) 2011-01-27 20:52:17.383000: Maximum supported GIOP version
> is 1.2
> omniORB: (0) 2011-01-27 20:52:17.384000: Native char code sets: UTF-8
> ISO-8859-1
> .
> omniORB: (0) 2011-01-27 20:52:17.384000: Transmission char code sets:
> UTF-8(1.2)
>   UTF-8(1.1) ISO-8859-1(1.2) ISO-8859-1(1.1) ISO-8859-1(1.0).
> omniORB: (0) 2011-01-27 20:52:17.384000: Native wide char code sets: UTF-16.
> omniORB: (0) 2011-01-27 20:52:17.384000: Transmission wide char code
> sets: UTF-1
> 6(1.2).
> omniORB: (0) 2011-01-27 20:52:17.385000: Initialising omniDynamic library.
> omniORB: (0) 2011-01-27 20:52:17.386000: Current configuration is as
> follows:
> omniORB:   DefaultInitRef (file) =
> omniORB:   DefaultInitRef (args) =
> omniORB:   abortOnInternalError = 0
> omniORB:   abortOnNativeException = 0
> omniORB:   acceptBiDirectionalGIOP = 0
> omniORB:   acceptMisalignedTcIndirections = 0
> omniORB:   bootstrapAgentHostname =
> omniORB:   bootstrapAgentPort = 900
> omniORB:   clientCallTimeOutPeriod = 0
> omniORB:   clientConnectTimeOutPeriod = 0
> omniORB:   clientTransportRule = * unix,ssl,tcp
> omniORB:   configFile = C:\OMNIORB.CFG
> omniORB:   connectionWatchImmediate = 0
> omniORB:   connectionWatchPeriod = 50000
> omniORB:   copyValuesInLocalCalls = 1
> omniORB:   diiThrowsSysExceptions = 0
> omniORB:   dumpConfiguration = 0
> omniORB:   endPoint = giop:tcp::
> omniORB:   endPointPublish = addr
> omniORB:   giopMaxMsgSize = 2097152
> omniORB:   giopTargetAddressMode = KeyAddr
> omniORB:   id = omniORB4
> omniORB:   idleThreadTimeout = 10
> omniORB:   immediateAddressSwitch = 0
> omniORB:   inConScanPeriod = 180
> omniORB:   lcdMode = 0
> omniORB:   maxGIOPConnectionPerServer = 5
> omniORB:   maxGIOPVersion = 1.2
> omniORB:   maxInterleavedCallsPerConnection = 5
> omniORB:   maxServerThreadPerConnection = 100
> omniORB:   maxServerThreadPoolSize = 100
> omniORB:   maxSocketRecv = 131072
> omniORB:   maxSocketSend = 131072
> omniORB:   nativeCharCodeSet = ISO-8859-1
> omniORB:   nativeWCharCodeSet = UTF-16
> omniORB:   objectTableSize = 0
> omniORB:   offerBiDirectionalGIOP = 0
> omniORB:   oneCallPerConnection = 1
> omniORB:   outConScanPeriod = 120
> omniORB:   poaHoldRequestTimeout = 0
> omniORB:   poaUniquePersistentSystemIds = 1
> omniORB:   principal = [Null]
> omniORB:   resetTimeOutOnRetries = 0
> omniORB:   scanGranularity = 5
> omniORB:   serverCallTimeOutPeriod = 0
> omniORB:   serverTransportRule = * unix,ssl,tcp
> omniORB:   socketSendBuffer = 16384
> 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:   traceExceptions = 0
> omniORB:   traceFile = [stderr]
> omniORB:   traceInvocationReturns = 1
> omniORB:   traceInvocations = 1
> omniORB:   traceLevel = 25
> omniORB:   traceThreadId = 1
> omniORB:   traceTime = 1
> omniORB:   unixTransportDirectory = /tmp/omni-%u
> omniORB:   unixTransportPermission =  777
> omniORB:   useTypeCodeIndirections = 1
> omniORB:   verifyObjectExistsAndType = 1
> omniORB: (0) 2011-01-27 20:52:17.392000: Creating ref to remote: key<Param>
>   target id      : IDL:omg.org/CORBA/Object:1.0
> <http://omg.org/CORBA/Object:1.0>
>   most derived id:
> omniORB: (0) 2011-01-27 20:52:17.407000: Invoke '_is_a' on remote:
> key<Param>
> omniORB: (0) 2011-01-27 20:52:17.411000: Client attempt to connect to
> giop:tcp:1
> 0.9.18.193:4001 <http://0.9.18.193:4001>
> omniORB: (1) 2011-01-27 20:52:17.412000: AsyncInvoker: thread id = 1 has
> started
> . Total threads = 1
> omniORB: (1) 2011-01-27 20:52:17.414000: Scavenger task execute.
> omniORB: (0) 2011-01-27 20:52:17.425000: Client opened connection to
> giop:tcp:10
> .9.18.193:4001
> omniORB: (0) 2011-01-27 20:52:17.425000: sendChunk: to
> giop:tcp:10.9.18.193:4001 <http://10.9.18.193:4001>
>   80 bytes
> omniORB: (0) 2011-01-27 20:52:17.426000: inputMessage: from
> giop:tcp:10.9.18.193
> :4001 25 bytes
> omniORB: (0) 2011-01-27 20:52:17.426000: Return '_is_a' on remote:
> key<Param>
> omniORB: (0) 2011-01-27 20:52:17.427000: Creating ref to remote: key<Param>
>   target id      : IDL:Param/ParamBook:1.0
>   most derived id:
> omniORB: (0) 2011-01-27 20:52:17.428000: ObjRef() -- deleted.
> omniORB: (0) 2011-01-27 20:52:33.431000: Invoke 'send_book' on remote:
> key<Param
>  >
> omniORB: (0) 2011-01-27 20:52:33.432000: sendChunk: to
> giop:tcp:10.9.18.193:4001 <http://10.9.18.193:4001>
>   1374 bytes
> omniORB: (0) 2011-01-27 20:52:33.434000: inputMessage: from
> giop:tcp:10.9.18.193
> :4001 25 bytes
> omniORB: (0) 2011-01-27 20:52:33.435000: Return 'send_book' on remote:
> key<Param
>  >
>
> //The below invoke of send_book fails
> omniORB: (0) 2011-01-27 20:55:33.811000: Invoke 'send_book' on remote:
> key<Param
>  >
> omniORB: (0) 2011-01-27 20:55:33.812000: sendChunk: to
> giop:tcp:10.9.18.193:4001 <http://10.9.18.193:4001>
>   1374 bytes
> omniORB: (0) 2011-01-27 20:55:33.815000: Client connection refcount = 0
> omniORB: (0) 2011-01-27 20:55:33.815000: Client close connection to
> giop:tcp:10.
> 9.18.193:4001
>
> Exception Caught
>
> // the below call executes
> omniORB: (0) 2011-01-27 20:55:33.824000: Invoke 'send_book' on remote:
> key<Param
>  >
> omniORB: (0) 2011-01-27 20:55:33.825000: Client attempt to connect to
> giop:tcp:1
> 0.9.18.193:4001 <http://0.9.18.193:4001>
> omniORB: (0) 2011-01-27 20:55:33.827000: Client opened connection to
> giop:tcp:10
> .9.18.193:4001
> omniORB: (0) 2011-01-27 20:55:33.828000: sendChunk: to
> giop:tcp:10.9.18.193:4001 <http://10.9.18.193:4001>
>   1374 bytes
> omniORB: (0) 2011-01-27 20:55:33.830000: inputMessage: from
> giop:tcp:10.9.18.193
> :4001 25 bytes
> omniORB: (0) 2011-01-27 20:55:33.831000: Return 'send_book' on remote:
> key<Param
>  >
> omniORB: (0) 2011-01-27 20:55:41.861000: Invoke 'send_book' on remote:
> key<Param
>  >
> omniORB: (0) 2011-01-27 20:55:41.862000: sendChunk: to
> giop:tcp:10.9.18.193:4001 <http://10.9.18.193:4001>
>   1374 bytes
> omniORB: (0) 2011-01-27 20:55:41.864000: inputMessage: from
> giop:tcp:10.9.18.193
> :4001 25 bytes
> omniORB: (0) 2011-01-27 20:55:41.865000: Return 'send_book' on remote:
> key<Param
>  >
>
>
> Server trace:
>
> omniORB: Version: 4.1.5
> omniORB: Distribution date: Wed Dec 22 15:59:17 GMT 2010 dgrisby
> omniORB: Skip link local address fe80::213:72ff:fe90:6d4b on interface eth0.
> omniORB: Skip link local address fe80::213:72ff:fe90:6d4b on interface br0.
> omniORB: My addresses are:
> omniORB: 127.0.0.1
> omniORB: 127.0.0.2
> omniORB: 10.9.18.193
> omniORB: ::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) UTF-8(1.1).
> 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:   DefaultInitRef (file) =
> omniORB:   DefaultInitRef (args) =
> omniORB:   InitRef = NameService=corbaname::localhost
> omniORB:   abortOnInternalError = 0
> omniORB:   abortOnNativeException = 0
> omniORB:   acceptBiDirectionalGIOP = 1
> omniORB:   acceptMisalignedTcIndirections = 0
> omniORB:   bootstrapAgentHostname =
> omniORB:   bootstrapAgentPort = 900
> omniORB:   clientCallTimeOutPeriod = 0
> omniORB:   clientConnectTimeOutPeriod = 0
> omniORB:   clientTransportRule = * unix,ssl,tcp
> omniORB:   configFile = /etc/omniORB.cfg
> omniORB:   connectionWatchImmediate = 0
> omniORB:   connectionWatchPeriod = 50000
> omniORB:   copyValuesInLocalCalls = 1
> omniORB:   diiThrowsSysExceptions = 0
> omniORB:   dumpConfiguration = 0
> omniORB:   endPoint = giop:tcp::4001
> omniORB:   endPointPublish = addr
> omniORB:   giopMaxMsgSize = 536870912
> omniORB:   giopTargetAddressMode = KeyAddr
> omniORB:   id = omniORB4
> omniORB:   idleThreadTimeout = 10
> omniORB:   immediateAddressSwitch = 0
> omniORB:   inConScanPeriod = 0
> omniORB:   lcdMode = 0
> omniORB:   maxGIOPConnectionPerServer = 100
> omniORB:   maxGIOPVersion = 1.2
> omniORB:   maxInterleavedCallsPerConnection = 5
> omniORB:   maxServerThreadPerConnection = 100
> omniORB:   maxServerThreadPoolSize = 100
> omniORB:   maxSocketRecv = 2147483647
> omniORB:   maxSocketSend = 2147483647
> omniORB:   nativeCharCodeSet = ISO-8859-1
> omniORB:   nativeWCharCodeSet = UTF-16
> omniORB:   objectTableSize = 0
> omniORB:   offerBiDirectionalGIOP = 1
> omniORB:   oneCallPerConnection = 1
> omniORB:   outConScanPeriod = 0
> omniORB:   poaHoldRequestTimeout = 0
> omniORB:   poaUniquePersistentSystemIds = 1
> omniORB:   principal = [Null]
> omniORB:   resetTimeOutOnRetries = 0
> omniORB:   scanGranularity = 5
> omniORB:   serverCallTimeOutPeriod = 0
> omniORB:   serverTransportRule = * unix,ssl,tcp
> omniORB:   socketSendBuffer = -1
> 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:   traceExceptions = 1
> omniORB:   traceFile = [stderr]
> omniORB:   traceInvocationReturns = 0
> omniORB:   traceInvocations = 0
> omniORB:   traceLevel = 25
> omniORB:   traceThreadId = 0
> omniORB:   traceTime = 0
> omniORB:   unixTransportDirectory = /tmp/omni-%u
> omniORB:   unixTransportPermission =  777
> omniORB:   useTypeCodeIndirections = 1
> omniORB:   validateUTF8 = 0
> omniORB:   verifyObjectExistsAndType = 1
> omniORB: Initialising incoming endpoints.
> omniORB: Instantiate endpoint 'giop:tcp::4001'
> omniORB: Bind to address :: port 4001.
> omniORB: Publish specification: 'addr'
> omniORB: Try to publish 'addr' for endpoint giop:tcp:10.9.18.193:4001
> <http://10.9.18.193:4001>
> omniORB: Publish endpoint 'giop:tcp:10.9.18.193:4001
> <http://10.9.18.193:4001>'
> omniORB: Starting serving incoming endpoints.
> omniORB: AsyncInvoker: thread id = 1 has started. Total threads = 1
> omniORB: giopRendezvouser task execute for giop:tcp:10.9.18.193:4001
> <http://10.9.18.193:4001>
> omniORB: Adding key<Param> (activating) to object table.
> omniORB: State key<Param> (activating) -> active
> omniORB: Creating ref to local: key<Param>
>   target id      : IDL:omg.org/CORBA/Object:1.0
> <http://omg.org/CORBA/Object:1.0>
>   most derived id: IDL:Param/ParamBook:1.0
> IOR:010000001800000049444c3a506172616d2f506172616d426f6f6b3a312e300001000000000000005c000000010102000c00000031302e392e31382e31393300a10f000005000000506172616d0000000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100
> omniORB: SocketCollection idle. Sleeping.
> omniORB: Version: 4.1.5
> omniORB: Distribution date: Wed Dec 22 15:59:17 GMT 2010 dgrisby
> omniORB: Skip link local address fe80::213:72ff:fe90:6d4b on interface eth0.
> omniORB: Skip link local address fe80::213:72ff:fe90:6d4b on interface br0.
> omniORB: My addresses are:
> omniORB: 127.0.0.1
> omniORB: 127.0.0.2
> omniORB: 10.9.18.193
> omniORB: ::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) UTF-8(1.1).
> 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:   DefaultInitRef (file) =
> omniORB:   DefaultInitRef (args) =
> omniORB:   InitRef = NameService=corbaname::localhost
> omniORB:   abortOnInternalError = 0
> omniORB:   abortOnNativeException = 0
> omniORB:   acceptBiDirectionalGIOP = 1
> omniORB:   acceptMisalignedTcIndirections = 0
> omniORB:   bootstrapAgentHostname =
> omniORB:   bootstrapAgentPort = 900
> omniORB:   clientCallTimeOutPeriod = 0
> omniORB:   clientConnectTimeOutPeriod = 0
> omniORB:   clientTransportRule = * unix,ssl,tcp
> omniORB:   configFile = /etc/omniORB.cfg
> omniORB:   connectionWatchImmediate = 0
> omniORB:   connectionWatchPeriod = 50000
> omniORB:   copyValuesInLocalCalls = 1
> omniORB:   diiThrowsSysExceptions = 0
> omniORB:   dumpConfiguration = 0
> omniORB:   endPoint = giop:tcp::4001
> omniORB:   endPointPublish = addr
> omniORB:   giopMaxMsgSize = 536870912
> omniORB:   giopTargetAddressMode = KeyAddr
> omniORB:   id = omniORB4
> omniORB:   idleThreadTimeout = 10
> omniORB:   immediateAddressSwitch = 0
> omniORB:   inConScanPeriod = 0
> omniORB:   lcdMode = 0
> omniORB:   maxGIOPConnectionPerServer = 100
> omniORB:   maxGIOPVersion = 1.2
> omniORB:   maxInterleavedCallsPerConnection = 5
> omniORB:   maxServerThreadPerConnection = 100
> omniORB:   maxServerThreadPoolSize = 100
> omniORB:   maxSocketRecv = 2147483647
> omniORB:   maxSocketSend = 2147483647
> omniORB:   nativeCharCodeSet = ISO-8859-1
> omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 2
> omniORB: Scavenger task execute.
> omniORB: Server accepted connection from giop:tcp:[::ffff:10.9.19.20]:54325
> omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 3
> omniORB: giopWorker task execute.
> omniORB: Accepted connection from giop:tcp:[::ffff:10.9.19.20]:54325
> because of this rule: "* unix,ssl,tcp"
> omniORB: inputMessage: from giop:tcp:[::ffff:10.9.19.20]:54325 80 bytes
> omniORB: sendChunk: to giop:tcp:[::ffff:10.9.19.20]:54325 25 bytes
> omniORB: SocketCollection idle. Sleeping.
> omniORB: inputMessage: from giop:tcp:[::ffff:10.9.19.20]:54325 1374 bytes
> length of book: 1
> Exclusion Region Data Received
> omniORB: sendChunk: to giop:tcp:[::ffff:10.9.19.20]:54325 25 bytes
> omniORB: SocketCollection idle. Sleeping.
>
> // After server restart
> IOR:010000001800000049444c3a506172616d2f506172616d426f6f6b3a312e300001000000000000005c000000010102000c00000031302e392e31382e31393300a10f000005000000506172616d0000000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100
> omniORB: SocketCollection idle. Sleeping.
> omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 2
> omniORB: Scavenger task execute.
> omniORB: Server accepted connection from giop:tcp:[::ffff:10.9.19.20]:54333
> omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 3
> omniORB: giopWorker task execute.
> omniORB: Accepted connection from giop:tcp:[::ffff:10.9.19.20]:54333
> because of this rule: "* unix,ssl,tcp"
> omniORB: inputMessage: from giop:tcp:[::ffff:10.9.19.20]:54333 1374 bytes
> length of book: 1
> Exclusion Region Data Received
> omniORB: sendChunk: to giop:tcp:[::ffff:10.9.19.20]:54333 25 bytes
> omniORB: SocketCollection idle. Sleeping.
> omniORB: inputMessage: from giop:tcp:[::ffff:10.9.19.20]:54333 1374 bytes
> length of book: 1
> Exclusion Region Data Received
> omniORB: sendChunk: to giop:tcp:[::ffff:10.9.19.20]:54333 25 bytes
> omniORB: SocketCollection idle. Sleeping.
>
>
> Thanks
> Anirudh
>
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list




More information about the omniORB-list mailing list