Opened 5 years ago

Closed 4 years ago

#8284 closed defect (fixed)

Catch SSL read error in facilitator-email-poller

Reported by: dcf Owned by: dcf
Priority: Medium Milestone:
Component: Archived/Flashproxy Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The process dies today with the traceback:

2013-02-19 06:56:13 registering [scrubbed]
Traceback (most recent call last):
  File "/usr/local/bin/facilitator-email-poller", line 360, in <module>
    imap_loop(imap)
  File "/usr/local/bin/facilitator-email-poller", line 280, in imap_loop
    typ, data = imap.select("[Gmail]/All Mail")
  File "/usr/lib/python2.6/imaplib.py", line 642, in select
    typ, dat = self._simple_command(name, mailbox)
  File "/usr/lib/python2.6/imaplib.py", line 1060, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/lib/python2.6/imaplib.py", line 888, in _command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/lib/python2.6/imaplib.py", line 989, in _get_tagged_response
    self._get_response()
  File "/usr/lib/python2.6/imaplib.py", line 906, in _get_response
    resp = self._get_line()
  File "/usr/lib/python2.6/imaplib.py", line 999, in _get_line
    line = self.readline()
  File "/usr/lib/python2.6/imaplib.py", line 1170, in readline
    char = self.sslobj.read(1)
  File "/usr/lib/python2.6/ssl.py", line 136, in read
    return self._sslobj.read(len)
ssl.SSLError: [Errno 1] _ssl.c:1331: error:0407A079:rsa routines:RSA_padding_check_PKCS1_OAEP:oaep decoding error

Child Tickets

Change History (4)

comment:1 Changed 5 years ago by dcf

I also saw this one:

2013-03-08 12:13:52 registered client
Traceback (most recent call last):
  File "/usr/local/bin/facilitator-email-poller", line 329, in <module>
    imap_loop(imap)
  File "/usr/local/bin/facilitator-email-poller", line 249, in imap_loop
    typ, data = imap.select("[Gmail]/All Mail")
  File "/usr/lib/python2.6/imaplib.py", line 642, in select
    typ, dat = self._simple_command(name, mailbox)
  File "/usr/lib/python2.6/imaplib.py", line 1060, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/lib/python2.6/imaplib.py", line 888, in _command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/lib/python2.6/imaplib.py", line 989, in _get_tagged_response
    self._get_response()
  File "/usr/lib/python2.6/imaplib.py", line 906, in _get_response
    resp = self._get_line()
  File "/usr/lib/python2.6/imaplib.py", line 999, in _get_line
    line = self.readline()
  File "/usr/lib/python2.6/imaplib.py", line 1170, in readline
    char = self.sslobj.read(1)
  File "/usr/lib/python2.6/ssl.py", line 136, in read
    return self._sslobj.read(len)
socket.error: [Errno 104] Connection reset by peer

comment:2 Changed 4 years ago by aallai

Status: newneeds_review

At the dev meeting I had made a branch for this:

https://github.com/aallai/flashproxy.git email_poller_errors

comment:3 Changed 4 years ago by dcf

Status: needs_reviewneeds_revision

I think we actually want this exception handling one layer higher--around imap_loop rather than around imap.select Our connection is probably hosed at this point so we can't jump back into imap.select and need to reconnect.

I notice that we are already handling imaplib.IMAP4.abort in the main loop--I'll add exception handling there. That's also a nice place because it has the rate limiter that will keep us from reconnecting too fast if something is seriously wrong.

comment:4 Changed 4 years ago by dcf

Resolution: fixed
Status: needs_revisionclosed
Note: See TracTickets for help on using tickets.