My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  Advanced search   Search tips
Issue 872: Provide better errors for mail notification failure
3 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  chip...@gmail.com
Closed:  Mar 2010


Sign in to add a comment
 
Reported by jeffl...@gmail.com, Feb 9, 2009
We're using alpha2.

I think it has something to do with emailing.  I didn't change our email 
settings and every time we hit publish, it says:
"Error: undefined 500 OK
Please try again later. If this continues to happen, please report it to 
your administrator."
in an orange box at the top of the screen.  I hit publish again, and 
everything looks normal, except the email didn't get sent off.
Comment 1 by jeffl...@gmail.com, Feb 9, 2009
Oh, look at that, a traceback:

Environment:

Request Method: POST
Request URL: http://reviews.com/api/json/reviewrequests/143/reviews/175/replies/draft/save/
Django Version: 1.0.2 final
Python Version: 2.5.1
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.markup',
 'django.contrib.sites',
 'django.contrib.sessions',
 'djblets.datagrid',
 'djblets.feedview',
 'djblets.siteconfig',
 'djblets.util',
 'djblets.webapi',
 'reviewboard.accounts',
 'reviewboard.admin',
 'reviewboard.changedescs',
 'reviewboard.diffviewer',
 'reviewboard.iphone',
 'reviewboard.reports',
 'reviewboard.reviews',
 'reviewboard.scmtools',
 'reviewboard.webapi',
 'django_evolution']
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.http.ConditionalGetMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'djblets.siteconfig.middleware.SettingsMiddleware',
 'reviewboard.admin.middleware.LoadSettingsMiddleware',
 'djblets.log.middleware.LoggingMiddleware',
 'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware')


Traceback:
File "c:\devtools\python25\lib\site-packages\django-1.0.2_final-py2.5.egg\django\core\handlers\base.py" in get_response
  86.                 response = callback(request, *callback_args, **callback_kwargs)
File "c:\devtools\python25\lib\site-packages\django-1.0.2_final-py2.5.egg\django\views\decorators\cache.py" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)
File "c:\devtools\python25\lib\site-packages\Djblets-0.5alpha2-py2.5.egg\djblets\webapi\decorators.py" in _checklogin
  32.             response = view_func(request, *args, **kwargs)
File "c:\devtools\python25\lib\site-packages\django-1.0.2_final-py2.5.egg\django\views\decorators\http.py" in inner
  31.             return func(request, *args, **kwargs)
File "c:\devtools\python25\lib\site-packages\ReviewBoard-1.0alpha2-py2.5.egg\reviewboard\webapi\json.py" in review_reply_draft_save
  1068.             mail_reply(request.user, reply)
File "c:\devtools\python25\lib\site-packages\ReviewBoard-1.0alpha2-py2.5.egg\reviewboard\reviews\email.py" in mail_reply
  228.                           'reply': reply})
File "c:\devtools\python25\lib\site-packages\ReviewBoard-1.0alpha2-py2.5.egg\reviewboard\reviews\email.py" in send_review_mail
  114.     message.send()
File "c:\devtools\python25\lib\site-packages\django-1.0.2_final-py2.5.egg\django\core\mail.py" in send
  271.         return self.get_connection(fail_silently).send_messages([self])
File "c:\devtools\python25\lib\site-packages\django-1.0.2_final-py2.5.egg\django\core\mail.py" in send_messages
  166.         new_conn_created = self.open()
File "c:\devtools\python25\lib\site-packages\django-1.0.2_final-py2.5.egg\django\core\mail.py" in open
  131.                                            local_hostname=DNS_NAME.get_fqdn())
File "C:\devtools\Python25\lib\smtplib.py" in __init__
  244.             (code, msg) = self.connect(host, port)
File "C:\devtools\Python25\lib\smtplib.py" in connect
  310.             raise socket.error, msg

Exception Type: error at /api/json/reviewrequests/143/reviews/175/replies/draft/save/
Exception Value: (10053, 'Software caused connection abort')

Comment 2 by project member chip...@gmail.com, Feb 9, 2009
I'll need some kind of backtrace to diagnose this. Can you turn on DEBUG = True and
see what error it comes out with?
Status: NeedInfo
Comment 3 by jeffl...@gmail.com, Feb 9, 2009
We're already trying to figure out the issue.  Here's what we have so far.

Python can't open a socket connection on localhost:25 because our "server" is blocked on port 25.  We're running it 
on a developer PC right now until our server is set up.  We made a change to email.py to unblock a port using a 
registry hack way back when we started using reviewboard.  We have to do this because once we change the registry 
to modify the domain profile, it gets reset to default after we use it once.  Anyway, we've upgraded several times 
since then, and this is the first time the problem has resurfaced.  Not sure why we haven't seen the regression 
before this.

Perhaps you could make the error message a bit more verbose, ie "Email failed.  Are you sure your mail port isn't 
blocked?"
Comment 4 by jeffl...@gmail.com, Feb 10, 2009
We added the port unblocking script back in and it's working fine again.
Comment 5 by project member chip...@gmail.com, Feb 26, 2009
We should certainly do this. This might slip to 1.5, though.
Status: Confirmed
Labels: -Priority-Medium Priority-Low Milestone-Release1.0 BetterErrors Component-EMail
Comment 6 by project member chip...@gmail.com, Feb 26, 2009
(No comment was entered for this change.)
Summary: Provide better errors for mail notification failure
Comment 8 by project member chip...@gmail.com, May 1, 2009
Going to push this out to 1.1.
Labels: -Milestone-Release1.0 Milestone-Release1.1
Comment 9 by project member chip...@gmail.com, Oct 7, 2009
 Issue 1336  has been merged into this issue.
Comment 10 by project member chip...@gmail.com, Dec 20, 2009
(No comment was entered for this change.)
Labels: Milestone-Release1.5
Comment 11 by project member chip...@gmail.com, Mar 5, 2010
(No comment was entered for this change.)
Status: PendingReview
Owner: chipx86
Comment 12 by project member chip...@gmail.com, Mar 5, 2010
Fixed on master (d2c96d9).
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting