> Attached is the small example, derived from $TAO_ROOT/tests/Timeout
> To run, make sure you have unreachable IP (in this case it is
> 92.168.108.40):
I think that if the ORB can figure out that the server host is
unreachable it should throw a different exception than if the host is
reachable, but just slow.
Thanks,
Doug
I am not sure what exactly you mean by this.
The behavior which we had with ACE-5.2.1 is that after the specified
timeout elapses, the client catches "CORBA::TIMEOUT", when the remote
server machine is powered down.
We have the exacltly same behavior with ACE-5.4.1, but the exception is
CORBA::TRANSIENT. So, when the specified timeout elapses (in the example
session posted with example it was 2 seconds) I cought the TRANSIENT
exception.
ORB would figure out that the remote machine is unreachable probably
after some (typically longer, I think we are talking about minutes here)
period of time, depending on how the tcp stack is configured. But I
thought that 5.2.1 behavior is correct, in terminating invocation early,
and throwing CORBA::TIMEOUT.
Thanks, Milan.
Balachandran Natarajan wrote:
> If your connect () returns faster than the timeout, there is no way
> TAO is going to loop till the timeout expires. Seems like that is what
> is happening. To double check this, just remove the timeout and see
> whether the ORB waits for a long time before it gives up making
> a connection. If the client exits quickly, obviously a timeout is of
> no use here.
No, it waits almost forever :-(
$ time ./client -k corbaloc:iiop:192.168.108.40:9000/Test
(10664|1) EXCEPTION, Transient caught:
system exception, ID 'IDL:omg.org/CORBA/TRANSIENT:1.0'
OMG minor code (2), described as 'No usable profile in IOR.', completed = NO
real 3m44.781s
user 0m0.120s
sys 0m0.050s
But, if I specify 2 seconds timeout (-t 2000):
$ time ./client -t 2000 -k corbaloc:iiop:192.168.108.40:9000/Test
(10627|1) EXCEPTION, Transient caught:
system exception, ID 'IDL:omg.org/CORBA/TRANSIENT:1.0'
OMG minor code (2), described as 'No usable profile in IOR.', completed = NO
real 0m2.193s
user 0m0.130s
sys 0m0.020s
Milan,
Grrr... Could you please send the test to bala at dre dot vanderbilt.edu
and mark a copy to jwillemsen at remedy dot nl?
Thanks
Bala