[Twisted-Python] Properly handling Connection Refused

I have this application built in twisted that is pretty robust save for one thing. The server reconnects when it falters or fails for any reason EXCEPT a refused connection, which happens when connecting to services on the Windows servers we have where particular services have not yet been started, which is normal. Every other failure is handled gracefully, including the database disappearing suddenly. I print out the reason in the log and I get this error: [Uninitialized] Reason: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionRefusedError'>: Connection was refused by other side: 111: Connection refused. [Uninitialized] ] [Uninitialized] Stopping factory <SomeFactory instance at 0x88b77ac> And the whole thing stops processing and does not restart the connection. I am running on Ubuntu 7.04 with the twisted packages therein: python-twisted 2.5.0-0ubuntu3 Is this a bug that others have seen? Should I use the tarball from twisted Matrix or use the gutsy packages?

On Wed, 5 Sep 2007 12:24:35 -0700 (PDT), Beau Hargis <beau@subobscur.us> wrote:
I have this application built in twisted that is pretty robust save for one thing. The server reconnects when it falters or fails for any reason EXCEPT a refused connection, which happens when connecting to services on the Windows servers we have where particular services have not yet been started, which is normal. Every other failure is handled gracefully, including the database disappearing suddenly. I print out the reason in the log and I get this error:
[Uninitialized] Reason: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionRefusedError'>: Connection was refused by other side: 111: Connection refused. [Uninitialized] ] [Uninitialized] Stopping factory <SomeFactory instance at 0x88b77ac>
And the whole thing stops processing and does not restart the connection.
How did you implement reconnection? Jean-Paul
participants (2)
-
Beau Hargis
-
Jean-Paul Calderone