[Twisted-Python] Imap client problem, help fro troubleshoot
Hello All, I have this[1] IMAP4 client in twisted, but I'am getting this error too much, how can I troubleshoot it or how can I restart the main loop after this failure? Traceback (most recent call last): Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly. 2011-02-24 10:31:34-0600 [IMAP4Client,client] Disconnected at: Thu Feb 24 10:31:34 2011 2011-02-24 10:31:34-0600 [IMAP4Client,client] Connection Lost: Reason: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly. 2011-02-24 10:31:34-0600 [IMAP4Client,client] ] 2011-02-24 10:31:34-0600 [IMAP4Client,client] <twisted.internet.tcp.Connector instance at 0x5f8a30> will retry in 7 seconds 2011-02-24 10:31:34-0600 [IMAP4Client,client] Stopping factory <__builtin__.IMAP4ClientFactory instance at 0xbd4468> 2011-02-24 10:31:34-0600 [-] Main loop terminated. 2011-02-24 10:31:34-0600 [-] Server Shut Down. [1] http://pastebin.com/GrqG3MyD -- http://celord.blogspot.com/
On 24 Feb, 04:51 pm, celord@gmail.com wrote:
Hello All, I have this[1] IMAP4 client in twisted, but I'am getting this error too much, how can I troubleshoot it or how can I restart the main loop after this failure?
Traceback (most recent call last): Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly.
Your code already appears to be based on ReconnectingClientFactory, so your client should reconnect after it loses its connection. The main thing that would prevent this is if you stop the reactor, which you also appear to be doing. If you want the reconnection attempt to succeed, then try not stopping the reactor. Jean-Paul
2011-02-24 10:31:34-0600 [IMAP4Client,client] Disconnected at: Thu Feb 24 10:31:34 2011 2011-02-24 10:31:34-0600 [IMAP4Client,client] Connection Lost: Reason: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly. 2011-02-24 10:31:34-0600 [IMAP4Client,client] ] 2011-02-24 10:31:34-0600 [IMAP4Client,client] <twisted.internet.tcp.Connector instance at 0x5f8a30> will retry in 7 seconds 2011-02-24 10:31:34-0600 [IMAP4Client,client] Stopping factory <__builtin__.IMAP4ClientFactory instance at 0xbd4468> 2011-02-24 10:31:34-0600 [-] Main loop terminated. 2011-02-24 10:31:34-0600 [-] Server Shut Down.
[1] http://pastebin.com/GrqG3MyD
-- http://celord.blogspot.com/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Hi Jean-Paul thank a lot for your reply, intentionally I'm not stopping the reactor this comes without my intervention
Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly
there is where I get lost, I'm using Solaris 10, python 2.6.2 and twisted 10.1.0, could Solaris be the problem ? 2011/2/25 <exarkun@twistedmatrix.com>:
On 24 Feb, 04:51 pm, celord@gmail.com wrote:
Hello All, I have this[1] IMAP4 client in twisted, but I'am getting this error too much, how can I troubleshoot it or how can I restart the main loop after this failure?
Traceback (most recent call last): Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly.
Your code already appears to be based on ReconnectingClientFactory, so your client should reconnect after it loses its connection. The main thing that would prevent this is if you stop the reactor, which you also appear to be doing. If you want the reconnection attempt to succeed, then try not stopping the reactor.
Jean-Paul
2011-02-24 10:31:34-0600 [IMAP4Client,client] Disconnected at: Thu Feb 24 10:31:34 2011 2011-02-24 10:31:34-0600 [IMAP4Client,client] Connection Lost: Reason: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly. 2011-02-24 10:31:34-0600 [IMAP4Client,client] ] 2011-02-24 10:31:34-0600 [IMAP4Client,client] <twisted.internet.tcp.Connector instance at 0x5f8a30> will retry in 7 seconds 2011-02-24 10:31:34-0600 [IMAP4Client,client] Stopping factory <__builtin__.IMAP4ClientFactory instance at 0xbd4468> 2011-02-24 10:31:34-0600 [-] Main loop terminated. 2011-02-24 10:31:34-0600 [-] Server Shut Down.
[1] http://pastebin.com/GrqG3MyD
-- http://celord.blogspot.com/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
On 04:41 pm, celord@gmail.com wrote:
Hi Jean-Paul thank a lot for your reply, intentionally I'm not stopping the reactor this comes without my intervention
There are several calls to `reactor.stop` in the example, though. The reactor won't stop unless that method is called.
Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly
there is where I get lost, I'm using Solaris 10, python 2.6.2 and twisted 10.1.0, could Solaris be the problem ?
I don't know why the connection is being closed. The most likely reason is that there's a problem with the protocol class which causes it either to raise an exception locally when handling data or which causes it to send something that the server dislikes enough that it closes the connection. You could rule out the former by enabling logging when the process starts, instead of only immediately before it stops. For the latter, you'll have to look at network captures and understand the behavior of the server you're talking to. Jean-Paul
OK Thanks a lot, I'll try that. 2011/2/25 <exarkun@twistedmatrix.com>:
On 04:41 pm, celord@gmail.com wrote:
Hi Jean-Paul thank a lot for your reply, intentionally I'm not stopping the reactor this comes without my intervention
There are several calls to `reactor.stop` in the example, though. The reactor won't stop unless that method is called.
Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly
there is where I get lost, I'm using Solaris 10, python 2.6.2 and twisted 10.1.0, could Solaris be the problem ?
I don't know why the connection is being closed. The most likely reason is that there's a problem with the protocol class which causes it either to raise an exception locally when handling data or which causes it to send something that the server dislikes enough that it closes the connection.
You could rule out the former by enabling logging when the process starts, instead of only immediately before it stops.
For the latter, you'll have to look at network captures and understand the behavior of the server you're talking to.
Jean-Paul
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (2)
-
César García
-
exarkun@twistedmatrix.com