RMI stuck on network disconnection
Peter Jones
pcj at roundroom.net
Wed Jun 10 03:51:51 UTC 2009
On Jun 8, 2009, at 10:27 AM, Alan Bateman wrote:
> Guy Korland wrote:
>> Hi,
>>
>> I found out that an RMI call might never return on network
>> disconnection and will not throw RemoteException as expected.
>> The scenario is very simple:
>>
>> 1. Find a remote stub (the stub should be behind a router).
>> 2. Physically disconnect the server from the LAN.
>> 3. Invoke a method from the client, the client can stuck without an
>> exception up to 30 min.
>>
>> Any ideas?
>>
>> --
>> Thanks,
>> Guy
> I would suggest searching the archives of the rmi-users list [1].
> Also check the properties that control timeouts [2].
>
> -Alan.
>
> [1] http://archives.java.sun.com/archives/rmi-users.html
> [2] http://java.sun.com/javase/6/docs/technotes/guides/rmi/sunrmiproperties.html
Hmm, it had been my understanding that the LISTSERV at java.sun.com
would cease operation at the beginning of this month, but at least the
archives still seem available for now (which is great). Here is a
post from some years ago about the behavior of an RMI/JRMP client in
the face of network disconnection at various stages of a connection's
life cycle, and some ways of controlling it:
http://archives.java.sun.com/cgi-bin/wa?A2=ind0212&L=rmi-
users&P=731
Are you saying that the invocation eventually fails with an exception,
after 30 minutes? In the situation you describe, with the connection
attempt not starting until after the network disconnection has
occurred, I would expect a RemoteException when the TCP retransmission
for connection establishment expires-- the default timeout for this
varies by OS but is typically from one to several minutes.
-- Peter
More information about the core-libs-dev
mailing list