Complete.Org: Mailing Lists: Archives: offlineimap: November 2002:
Network retry
Home

Network retry

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: Network retry
From: Jared Rhine <jared@xxxxxxxxxxx>
Date: Thu, 14 Nov 2002 12:19:32 -0800

A feature thought...It'd be nice if my offlineimap configuration were
a bit more robust in the face of network errors.  My machine at home
has network access about 99.5 percent of the time, but the network
does go down (SF Bay Area cable modem connectivity).  So offlineimap
dies (tracebacks below).

There's two design options; offlineimap could catch more network
errors and just ignore them.  But I already have to wrap offlineimap
to log errors usefully, so I could also just extend that to do a
restart when offlineimap dies.  That's a slightly more robust approach
(and there's a number of tools out there that generalize the
solution).

Is wrapping offlineimap with a restarter/logger the preferred way to
get this functionality?

-- begin --

Traceback (most recent call last):
  File "/usr/lib/python2.2/site-packages/offlineimap/threadutil.py", line 115, 
in run
    Thread.run(self)
  File "/usr/lib/python2.2/threading.py", line 396, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "/usr/lib/python2.2/site-packages/offlineimap/syncmaster.py", line 137, 
in syncfolder
    localfolder.syncmessagesto(statusfolder, [remotefolder, statusfolder])
  File "/usr/lib/python2.2/site-packages/offlineimap/folder/Base.py", line 291, 
in syncmessagesto
    self.syncmessagesto_delete(dest, applyto)
  File "/usr/lib/python2.2/site-packages/offlineimap/folder/Base.py", line 254, 
in syncmessagesto_delete
    object.deletemessages(deletelist)
  File "/usr/lib/python2.2/site-packages/offlineimap/folder/IMAP.py", line 244, 
in deletemessages
    self.addmessagesflags(uidlist, ['T'])
  File "/usr/lib/python2.2/site-packages/offlineimap/folder/IMAP.py", line 204, 
in addmessagesflags
    imaputil.flagsmaildir2imap(flags))
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 665, in 
uid
    typ, dat = apply(self._simple_command, (name, command) + args)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 968, in 
_simple_command
    return self._command_complete(name, apply(self._command, (name,) + args))
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 798, in 
_command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 899, in 
_get_tagged_response
    self._get_response()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 816, in 
_get_response
    resp = self._get_line()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 909, in 
_get_line
    line = self.readline()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 234, in 
readline
    return self.file.readline()
IOError: [Errno 104] Connection reset by peer

Traceback (most recent call last):
  File "/usr/lib/python2.2/site-packages/offlineimap/threadutil.py", line 115, 
in run
    Thread.run(self)
  File "/usr/lib/python2.2/threading.py", line 396, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "/usr/lib/python2.2/site-packages/offlineimap/syncmaster.py", line 53, 
in syncaccount
    remoterepos.syncfoldersto(localrepos)
  File "/usr/lib/python2.2/site-packages/offlineimap/repository/Base.py", line 
40, in syncfoldersto
    srcfolders = src.getfolders()
  File "/usr/lib/python2.2/site-packages/offlineimap/repository/IMAP.py", line 
57, in getfolders
    imapobj = self.imapserver.acquireconnection()
  File "/usr/lib/python2.2/site-packages/offlineimap/imapserver.py", line 168, 
in acquireconnection
    imapobj = UsefulIMAP4(self.hostname, self.port)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 153, in 
__init__
    self.open(host, port)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 221, in 
open
    self.sock.connect((host, port))
gaierror: (-3, 'Temporary failure in name resolution')

Traceback (most recent call last):
  File "/usr/lib/python2.2/site-packages/offlineimap/threadutil.py", line 115, 
in run
    Thread.run(self)
  File "/usr/lib/python2.2/threading.py", line 396, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "/usr/lib/python2.2/site-packages/offlineimap/syncmaster.py", line 53, 
in syncaccount
    remoterepos.syncfoldersto(localrepos)
  File "/usr/lib/python2.2/site-packages/offlineimap/repository/Base.py", line 
40, in syncfoldersto
    srcfolders = src.getfolders()
  File "/usr/lib/python2.2/site-packages/offlineimap/repository/IMAP.py", line 
59, in getfolders
    listresult = imapobj.list(directory = self.imapserver.reference)[1]
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 457, in 
list
    typ, dat = self._simple_command(name, directory, pattern)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 968, in 
_simple_command
    return self._command_complete(name, apply(self._command, (name,) + args))
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 798, in 
_command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 899, in 
_get_tagged_response
    self._get_response()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 816, in 
_get_response
    resp = self._get_line()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 909, in 
_get_line
    line = self.readline()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 234, in 
readline
    return self.file.readline()
IOError: [Errno 110] Connection timed out

Thread 'Account sync wordzoo' terminated with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.2/site-packages/offlineimap/threadutil.py", line 115, 
in run
    Thread.run(self)
  File "/usr/lib/python2.2/threading.py", line 396, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "/usr/lib/python2.2/site-packages/offlineimap/syncmaster.py", line 53, 
in syncaccount
    remoterepos.syncfoldersto(localrepos)
  File "/usr/lib/python2.2/site-packages/offlineimap/repository/Base.py", line 
40, in syncfoldersto
    srcfolders = src.getfolders()
  File "/usr/lib/python2.2/site-packages/offlineimap/repository/IMAP.py", line 
59, in getfolders
    listresult = imapobj.list(directory = self.imapserver.reference)[1]
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 457, in 
list
    typ, dat = self._simple_command(name, directory, pattern)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 968, in 
_simple_command
    return self._command_complete(name, apply(self._command, (name,) + args))
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 798, in 
_command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 899, in 
_get_tagged_response
    self._get_response()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 816, in 
_get_response
    resp = self._get_line()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 909, in 
_get_line
    line = self.readline()
  File "/usr/lib/python2.2/site-packages/offlineimap/imaplib.py", line 234, in 
readline
    return self.file.readline()
IOError: [Errno 113] No route to host

-- end --

-- jared@xxxxxxxxxxx

http://www.geekcode.com/geek.html
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/B
d s:++>+ a-
C++(++++)$ USL++++ P+++ L+++ E++(+++) W++++ N- !o !K w !O M V
PS+++(-) PE++(--) Y+ PGP>++
t@ 5 X+ R>+ tv++>-- b>++ DI+ D- G
e++ h- r++>+++ y+++
------END GEEK CODE BLOCK------


[Prev in Thread] Current Thread [Next in Thread]