Amin,

Sorry about not incorporating your patch - there are a bunch of issues
here that I'm in the midst of addressing.  This particular issue is
handled by replacing DefaultConnectionManager with a newly built
ConnectionManager implementation.

I'm pretty sure the issue you're running into is actually a Cornerstone
bug that's being triggered on your particular system.  Upon grabbing a
socket the DefaultConnectionManager checks to see if the socket timeout
is set to 0 (no timeout) and, if so, sets it to 500msec.  This is done
to prevent dangling sockets.

The concept isn't bad, although the 500msec value is a little low.  And
that's where I think the problem lies.  For a human interactive
connection a 500msec timeout is ridiculously low.  So it would be
possible for the connection to timeout basically immediately upon
opening the socket.

Now, why are you seeing this problem while others are not?  That too can
be explained by the above supposition.  The socket timeout value is
basically a suggestion, not a guarantee.  The TCP/IP socket can, but
doesn't have to, idle out after the timeout value has passed without
traffic.  Since socket idle timeouts are typically an error condition,
it is not particularly unusual for idle sockets to hang around for
periods longer than their idle timeout.

Resolution of this problem is best done by introducing a new
ConnectionManager implementation that supports configurable idle
timeouts and defaults to a somewhat higher value (i.e. 5 minutes).  I've
got such an implementation (based in part on Andrei's submission) that
I'm currently testing.  It's done, I just want to test it some more
before I submit it to the list for discussion.  So hopefully this
problem will be handled in the core code base shortly.

--Peter

> -----Original Message-----
> From: Amin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 11:31 PM
> To: James Developers List
> Subject: Re: RemoteManager : Could not open a connection to host:
Connect
> fail
> 
> I posted the patch the other day. Somehow it did not commit. Anyway
> setting
> the socket.setSoTimeout( int ) works great.
> 
> Amin
> ----- Original Message -----
> From: "Noel J. Bergman" <[EMAIL PROTECTED]>
> To: "James Developers List" <[EMAIL PROTECTED]>
> Sent: Friday, September 20, 2002 1:38 PM
> Subject: RE: RemoteManager : Could not open a connection to host:
Connect
> fail
> 
> 
> > Actually, I just checked the CVS, and it looks as if the change
didn't
> get
> > merged.  I believe that Peter is working on the handlers, so he
might
> have
> > an idea about what is happening.  My recollection of the bug is that
it
> was
> > necessary to explicitly set the soTimeout for the socket.
> >
> > --- Noel
> >
> > -----Original Message-----
> > From: Amin [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 20, 2002 1:21
> > To: James Developers List
> > Subject: Re: RemoteManager : Could not open a connection to host:
> > Connect fail
> >
> >
> > Hmm.. I gave a fix but i don't think it was good.. anyway the
structure
> has
> > changed from a few weeks ago.. i thought it was already fixed.. Any
hint
> > where to troubleshoot?
> >
> > Amin
> >
> > ----- Original Message -----
> > From: "Noel J. Bergman" <[EMAIL PROTECTED]>
> > To: "James Developers List" <[EMAIL PROTECTED]>
> > Sent: Friday, September 20, 2002 9:54 AM
> > Subject: RE: RemoteManager : Could not open a connection to host:
> Connect
> > fail
> >
> >
> > > As I recall, that is a Win2K JVM error that SHOULD be fixed in the
> current
> > > CVS code.
> > >
> > > --- Noel
> > >
> > > -----Original Message-----
> > > From: Amin [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, September 19, 2002 21:33
> > > To: James Developers List
> > > Subject: Re: RemoteManager : Could not open a connection to host:
> > > Connect fail
> > >
> > >
> > > hi,
> > >
> > > dang my mistake on that.. but now i hit another.. I get to connect
and
> as
> > > soon as i connect, i lose my connection.
> > > screen dump below.
> > > -------------------------------------------------
> > > JAMES RemoteAdministration Tool 2.1a1-cvs
> > > Please enter your login and password
> > > Login id:
> > > Password:
> > > Error. Closing connection
> > > -------------------------------------------------
> > > ---------Log file------------------------------
> > > Connection to host lost.
> > > 20/09/02 09:28:13 INFO  remotemanager: Access from
> 127.0.0.1(127.0.0.1)
> > > 20/09/02 09:28:14 ERROR remotemanager: Exception during connection
> from
> > > 127.0.0.1 (127.0.0.1): Read timed out
> > > ---------End log file--------------------------
> > >
> > > any ideas? using Java 1.4 and win2k.
> > >
> > > thanks
> > > Amin
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
> --
> To unsubscribe, e-mail:   <mailto:james-dev-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:james-dev-
> [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to