[Spread-users] SpreadException: spread.SpreadException: Connection closed while reading header

Michael Di Stefano mdistefano at integrasoftware.com
Mon Nov 30 17:18:58 EST 2009


Renee

Thank you for help, your and Andrew Gilmartin's responses pointed me to 
where the exception is being thrown and not caught.   I download the 
source for 4.1 and see in the java client code

    SpreadConnection.java file Class Listener - run() method line 1637  

SpreadConnection:internalreceive() is being called but SpreadException 
is not caught.


My application layer wraps spread such that it manages load balancing 
among the spread server cluster.   The desired behavior is that if a 
server connection is lost then attempt a reconnect to another server in 
the cluster.   Given the above, I see no way to get control back to my 
code to manage reconnects.   I guess my only option is to simply exit().

This brings me to my next "feature".  When I detect a closed connection 
on a send, I can not reconnect to any server, the message is that I am 
already connected.  This sounds like boolean variable check you describe 
below.

If you can please send me that code I would appreciate it.

Regards

Michael




Renee Mathur wrote:
> There is a bug in the client side piece of Spread-4.0.jar where it does not clear the state of a boolean variable if the spread daemon dies. Reconnection logic just checks for the boolean variable and if its' true, it assumed it's already connected, and does not attempt a re-connection.
> I'd sent an email about this to the spread group about 2-3 months back along with a fix to the source code.
> Let me know if you can't find it. I should be able to dig it for you - but only after I get back from my vacation in late Dec.
> Regards,
> Renee.
>  
>
> ________________________________
>
> From: spread-users-bounces at lists.spread.org on behalf of Michael Di Stefano
> Sent: Sat 11/28/2009 12:51 PM
> To: spread-users at lists.spread.org
> Subject: [Spread-users] SpreadException: spread.SpreadException: Connection closed while reading header
>
>
>
> Hi
>
> I am testing my application for error conditions and purposefully
> killing the spread server.  There is no message activity, the
> application is just sitting listening for a message.   (I am using a
> Basic Message Listener)
>
> When I kill the server I get
>   
>      SpreadException: spread.SpreadException: Connection closed while
> reading header
>
> printed to standard out.   I do not seem to be able to find where this
> exception is being thrown/printed and where to catch the exception so I
> can exit my program.
>
> My environment is
>
>    --- spread server is running on a MAC
>    --- Application is a written in Java using spread-4.0.0.jar
>
> Any advise is appreciated.
>
> Thanks
>
> Michael
>
>
>
>
>
>
>                                                                    
>                                                                    
>      
>                                                                    
>                                                                    
>   
>                             ******* CONFIDENTIALITY NOTICE *******
>
> This e-mail message and all attachments transmitted with it may
> contain legally privileged and confidential information intended
> solely for the use of the addressee. If the reader of this message
> is not the intended recipient, you are hereby notified that any
> reading, dissemination, distribution, copying, or other use of this
> message or its attachments is strictly prohibited. If you have
> received this message in error, please notify the sender
> immediately and delete this message from your system. Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdistefano.vcf
Type: text/x-vcard
Size: 164 bytes
Desc: not available
Url : http://lists.spread.org/pipermail/spread-users/attachments/20091130/a0529ab4/attachment.vcf 


More information about the Spread-users mailing list