You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Paul Smith <Pa...@lawlex.com.au> on 2004/05/25 02:58:35 UTC

Receiver Socket connection/reconnect problems (was RE: reconnecti ng to SocketHubAppender)

Turns out I am wrong, the SocketNode class IS catching the exception, but is
not properly notifying the listeners that the socket has closed.

committing fix shortly.  Now the SocketHubReceiver at least (this is the one
I use) properly does try to reconnect after a remote failure.

cheers,

Paul Smith

> -----Original Message-----
> From: Steve Mactaggart [mailto:steve@golftime.com.au]
> Sent: Tuesday, 25 May 2004 10:40 AM
> To: 'Log4J Developers List'
> Subject: RE: reconnecting to SocketHubAppender
> 
> 
> Yes that's probably true, didn't read the post that well, as I saw
> SocketHubAppender in the subject and read it from that side.
> 
> Steve
> 
> > -----Original Message-----
> > From: Paul Smith [mailto:Paul.Smith@lawlex.com.au] 
> > Sent: Tuesday, 25 May 2004 10:31 AM
> > To: 'Log4J Developers List'
> > Subject: RE: reconnecting to SocketHubAppender
> > 
> > > Just shooting from the hip, but when a message gets sent, I 
> > > assume it throws
> > > an exception if not connected, could you catch that exception 
> > > and attempt to
> > > re-connect..
> > >
> > 
> > This probably works ok on the SocketAppender side, but not on the
> > SocketHubReceiver side.  The SocketHubReceiver is on the 
> > client-side, and if
> > the remote server drops the connection (log4j or even 
> > application or server
> > restart), then the SocketHubReceiver does'nt know that the 
> > current socket is
> > dead.
> > 
> > Unless I just haven't had enough coffee today, that is.
> > 
> > Paul
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: Receiver Socket connection/reconnect problems (was RE: reconnecting to SocketHubAppender)

Posted by Mark Womack <mw...@apache.org>.
Paul, et al,

Thanks for reporting and tracking down this bug!  But just to be clear, the
Receiver is going to attempt the reconnect, right?  Not the appender?  The
whole point of the SocketHubAppender it that it does not spend any
time/resources trying to reconnect socket connections, that way it is less
of a resource drain on the source side.  That and it is more flexible to
connect to than SocketAppender.  I just want to make sure.

thanks,
-Mark

----- Original Message ----- 
From: "Paul Smith" <Pa...@lawlex.com.au>
To: "'Log4J Developers List'" <lo...@logging.apache.org>
Sent: Monday, May 24, 2004 5:58 PM
Subject: Receiver Socket connection/reconnect problems (was RE: reconnecting
to SocketHubAppender)


> Turns out I am wrong, the SocketNode class IS catching the exception, but
is
> not properly notifying the listeners that the socket has closed.
>
> committing fix shortly.  Now the SocketHubReceiver at least (this is the
one
> I use) properly does try to reconnect after a remote failure.
>
> cheers,
>
> Paul Smith
>
> > -----Original Message-----
> > From: Steve Mactaggart [mailto:steve@golftime.com.au]
> > Sent: Tuesday, 25 May 2004 10:40 AM
> > To: 'Log4J Developers List'
> > Subject: RE: reconnecting to SocketHubAppender
> >
> >
> > Yes that's probably true, didn't read the post that well, as I saw
> > SocketHubAppender in the subject and read it from that side.
> >
> > Steve
> >
> > > -----Original Message-----
> > > From: Paul Smith [mailto:Paul.Smith@lawlex.com.au]
> > > Sent: Tuesday, 25 May 2004 10:31 AM
> > > To: 'Log4J Developers List'
> > > Subject: RE: reconnecting to SocketHubAppender
> > >
> > > > Just shooting from the hip, but when a message gets sent, I
> > > > assume it throws
> > > > an exception if not connected, could you catch that exception
> > > > and attempt to
> > > > re-connect..
> > > >
> > >
> > > This probably works ok on the SocketAppender side, but not on the
> > > SocketHubReceiver side.  The SocketHubReceiver is on the
> > > client-side, and if
> > > the remote server drops the connection (log4j or even
> > > application or server
> > > restart), then the SocketHubReceiver does'nt know that the
> > > current socket is
> > > dead.
> > >
> > > Unless I just haven't had enough coffee today, that is.
> > >
> > > Paul
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org