Re: Client hung in code download read
Peter Jones <[email protected]> Tue, 25 Mar 2008 18:02:42 -0400
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <20080325220242.GA26066@east> |
On Sat, Mar 22, 2008 at 11:49:28AM -0700, Robert DiFalco wrote:
> Sometimes if a server is restarted at just the right time during a
> client startup, the client will hang in URLJarFile retrieve. It usually
> requires a manual restart of that client (I think it will timeout itself
> but only after something like 9 hours). Is there a read timeout I need
> to be setting somewhere? We've tried several read time out settings in
> different places to no avail. Anyone encountered this one before? Here's
> a thread dump of where the client hangs.
>
> BootstrapLauncher" prio=1 tid=0x083ba180 nid=0x7773 runnable
> [bd7fd000..bd7ff8cc]
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
> - locked <0x449e2cf8> (a java.io.BufferedInputStream)
> at sun.net.www.MeteredStream.read(MeteredStream.java:106)
> - locked <0x449e3aa8> (a sun.net.www.http.KeepAliveStream)
> at java.io.FilterInputStream.read(FilterInputStream.java:111)
> at java.io.FilterInputStream.read(FilterInputStream.java:90)
> at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:173)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164)
> at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42)
Assuming Sun's 1.4 or later, have you tried setting the
sun.net.client.defaultReadTimeout
system property? See:
http://java.sun.com/javase/6/docs/technotes/guides/net/properties.html
Note that this will affect all URLConnections that don't otherwise
have read timeouts set (like by URLConnection.setReadTimeout in 5.0
and later).
-- Peter
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html