Re: REJECT_NOT_UNIQUE
Lu Liu <[email protected]> Fri, 7 Dec 2012 23:45:06 +0000
| Newsgroups | gmane.network.spread.user |
|---|---|
| Message-ID | <1F0552D57B4C8740A37BF2B38AC64CB10FE4FDB7@CFWEX01.americas.cray.com> |
Jonathan, When you mentioned "turn on keep_alive" do you mean I need to configure this feature through a key word in spread.conf or something else? Looked at the code it seems when the function SP_connect_timeout() is used the setsockopt() will be called to enable the the keepalive option of the socket. Is that right? Thanks, Lu ________________________________________ From: Jonathan Stanton [[email protected]] Sent: Friday, December 07, 2012 2:40 PM To: Lu Liu Cc: [email protected] Subject: Re: [Spread-users] REJECT_NOT_UNIQUE When you stop a client normally, the Spread daemon gets notified that the client is disconnecting, so it removes it from it's set of active clients. Then when the client restarts it is allowed to connect. However if you power cycle the machine, it cuts off the packets between the client process and server before the client can notify the server that it is leaving, so it looks to the server as if nothing has happened to the client (no packets arrive from the client -- but none are expected unless the client is trying to act) so it thinks that client is still connected (and if you look at the server state, the tcp connection to the client will still be in an established state. (Note, I expect if you do a 'shutdown' of the client machine using the OS it will not have this problem as in that case the client process is killed and the tcp connection to the server is closed correctly by the OS, that is different then if you power cycle the server using the power button in which case the clean shu tdown doesn't happen) Now if the server tries to send a message to the client, it will get a tcp error and then will know to remove the client state and then can accept a new connection from that client. To get better detection of these 'idle disconnected' clients you can also turn on 'keep alives' in the newer versions of Spread. That will close the connection if probes that are sent every so many seconds are not responded to. Cheers, Jonathan ------------------------------------------------------------------------------- Jonathan Stanton [email protected] Spread Group Messaging www.spread.org Spread Concepts LLC www.spreadconcepts.com ------------------------------------------------------------------------------- On Dec 7, 2012, at 11:28 AM, Lu Liu wrote: > Hi, > > I am using spread 4.0.1. If I stop a client normally and restart the > client it connects to the server correctly. > But If I power cycled the client machine I got the error > "REJECT_NOT_UNIQUE". Any idea? > > Thanks, > > Lu > > _______________________________________________ > Spread-users mailing list > [email protected] > http://lists.spread.org/mailman/listinfo/spread-users