Re: SMTP support/debugging
On 04/19/2010 05:25 PM, Scott Quesnelle wrote: Here is what I did with V 1.0 when I had an email issue, in reviewboard/reviews/email.py In function def send_review_mail(user, review_request, subject, in_reply_to, extra_recipients, template_name, context={}): I added the line: logging.info http://logging.info(Sending e-mail with subject '%s' from '%s' to '%s', CC '%s'\n % (subject, from_email, to_field, cc_field)) just before this line: message.send() Looking at the return value of send would also be a potential way to debug it, my problem was a very slow and overloaded smtp server. My solution was to setup postfix on the local machine. It then sends it to the smtp server. This now means that some emails are slightly delayed (a few minutes) but has increased reliability. Scott Ok, so this confirms for me that ReviewBoard is not ever entering the send_review_mail() codepath. Any ideas why that would be, since the admin interface is set up correctly, with the appropriate checkbox marked. For the record, this is ReviewBoard 1.5beta1 plus the Optimize several queries for review requests. patch from April 1. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
In my case SMTP server doesn't provide TLS authentication but information about this issue I found in Apache logs without any problems. On Apr 20, 5:01 pm, Stephen Gallagher step...@gallagherhome.com wrote: On 04/19/2010 05:25 PM, Scott Quesnelle wrote: Here is what I did with V 1.0 when I had an email issue, in reviewboard/reviews/email.py In function def send_review_mail(user, review_request, subject, in_reply_to, extra_recipients, template_name, context={}): I added the line: logging.info http://logging.info(Sending e-mail with subject '%s' from '%s' to '%s', CC '%s'\n % (subject, from_email, to_field, cc_field)) just before this line: message.send() Looking at the return value of send would also be a potential way to debug it, my problem was a very slow and overloaded smtp server. My solution was to setup postfix on the local machine. It then sends it to the smtp server. This now means that some emails are slightly delayed (a few minutes) but has increased reliability. Scott Ok, so this confirms for me that ReviewBoard is not ever entering the send_review_mail() codepath. Any ideas why that would be, since the admin interface is set up correctly, with the appropriate checkbox marked. For the record, this is ReviewBoard 1.5beta1 plus the Optimize several queries for review requests. patch from April 1. -- Want to help the Review Board project? Donate today athttp://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
Sorry, maybe I was unclear. By putting that log message where Scott recommended, I proved that send_review_mail() was not being called at all (the log message never printed). So I'm trying to figure out how to track down the misconfiguration. On 04/20/2010 11:22 AM, Jan Koprowski wrote: In my case SMTP server doesn't provide TLS authentication but information about this issue I found in Apache logs without any problems. On Apr 20, 5:01 pm, Stephen Gallagherstep...@gallagherhome.com wrote: On 04/19/2010 05:25 PM, Scott Quesnelle wrote: Here is what I did with V 1.0 when I had an email issue, in reviewboard/reviews/email.py In function def send_review_mail(user, review_request, subject, in_reply_to, extra_recipients, template_name, context={}): I added the line: logging.infohttp://logging.info(Sending e-mail with subject '%s' from '%s' to '%s', CC '%s'\n % (subject, from_email, to_field, cc_field)) just before this line: message.send() Looking at the return value of send would also be a potential way to debug it, my problem was a very slow and overloaded smtp server. My solution was to setup postfix on the local machine. It then sends it to the smtp server. This now means that some emails are slightly delayed (a few minutes) but has increased reliability. Scott Ok, so this confirms for me that ReviewBoard is not ever entering the send_review_mail() codepath. Any ideas why that would be, since the admin interface is set up correctly, with the appropriate checkbox marked. For the record, this is ReviewBoard 1.5beta1 plus the Optimize several queries for review requests. patch from April 1. -- Want to help the Review Board project? Donate today athttp://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
I have some more ideas: 1) Check You can telnet to smtp server from machine where ReviewBoard works 2) Try to use IP address instead host name 3) Ask someone is this isn't the problem of proxy or DNS server. If You can telnet to server from command line (in Linux) check You have not set variable HTTP_PROXY or http_proxy this will be sign You need proxy to communicate with smtp server On Apr 20, 5:22 pm, Jan Koprowski jan.koprow...@gmail.com wrote: In my case SMTP server doesn't provide TLS authentication but information about this issue I found in Apache logs without any problems. On Apr 20, 5:01 pm, Stephen Gallagher step...@gallagherhome.com wrote: On 04/19/2010 05:25 PM, Scott Quesnelle wrote: Here is what I did with V 1.0 when I had an email issue, in reviewboard/reviews/email.py In function def send_review_mail(user, review_request, subject, in_reply_to, extra_recipients, template_name, context={}): I added the line: logging.info http://logging.info(Sending e-mail with subject '%s' from '%s' to '%s', CC '%s'\n % (subject, from_email, to_field, cc_field)) just before this line: message.send() Looking at the return value of send would also be a potential way to debug it, my problem was a very slow and overloaded smtp server. My solution was to setup postfix on the local machine. It then sends it to the smtp server. This now means that some emails are slightly delayed (a few minutes) but has increased reliability. Scott Ok, so this confirms for me that ReviewBoard is not ever entering the send_review_mail() codepath. Any ideas why that would be, since the admin interface is set up correctly, with the appropriate checkbox marked. For the record, this is ReviewBoard 1.5beta1 plus the Optimize several queries for review requests. patch from April 1. -- Want to help the Review Board project? Donate today athttp://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today athttp://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
On 04/20/2010 11:26 AM, Stephen Gallagher wrote: Sorry, maybe I was unclear. By putting that log message where Scott recommended, I proved that send_review_mail() was not being called at all (the log message never printed). So I'm trying to figure out how to track down the misconfiguration. Upon further investigation, it looks like the callback hooks for notifications are never being set up. I set a raise SyntaxError in reviewboard.notifications.email.connect_signals() and it never fired (and ReviewBoard continued to operate normally) So... can anyone tell me why notifications aren't being set up? -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
Good question... Can you run the test suite from a source tree and see if anything fails? (./reviewboard/manage.py test) Christian On Tuesday, April 20, 2010, Stephen Gallagher step...@gallagherhome.com wrote: On 04/20/2010 11:26 AM, Stephen Gallagher wrote: Sorry, maybe I was unclear. By putting that log message where Scott recommended, I proved that send_review_mail() was not being called at all (the log message never printed). So I'm trying to figure out how to track down the misconfiguration. Upon further investigation, it looks like the callback hooks for notifications are never being set up. I set a raise SyntaxError in reviewboard.notifications.email.connect_signals() and it never fired (and ReviewBoard continued to operate normally) So... can anyone tell me why notifications aren't being set up? -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
On 04/20/2010 02:48 PM, Christian Hammond wrote: Good question... Can you run the test suite from a source tree and see if anything fails? (./reviewboard/manage.py test) Christian Getting a traceback trying to run the tests. I'm using the contrib/conf/settings_local.py.tmpl as the settings_local.py in the root of the reviewboard directory. Running ./contrib/internal/devserver.sh works fine in this configuration. $ ./reviewboard/manage.py test Running dependency checks (set DEBUG=False to turn this off)... Warning: p4python (=07.3) not found. Perforce integration will not work. Warning: hg not found. Mercurial integration will not work. Warning: PyLucene (with JCC) is required to enable search. See the documentation for instructions. Warning: mtn binary not found. Monotone integration will not work. Please see http://www.reviewboard.org/docs/manual/dev/admin/ for help setting up Review Board. Creating test database... Traceback (most recent call last): File ./reviewboard/manage.py, line 138, in module execute_manager(settings) File /usr/lib/python2.6/site-packages/django/core/management/__init__.py, line 362, in execute_manager utility.execute() File /usr/lib/python2.6/site-packages/django/core/management/__init__.py, line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File /usr/lib/python2.6/site-packages/django/core/management/base.py, line 195, in run_from_argv self.execute(*args, **options.__dict__) File /usr/lib/python2.6/site-packages/django/core/management/base.py, line 222, in execute output = self.handle(*args, **options) File /usr/lib/python2.6/site-packages/django/core/management/commands/test.py, line 23, in handle failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive) File /home/bos/sgallagh/workspace/reviewboard/reviewboard/test.py, line 63, in runner connection.creation.create_test_db(verbosity, autoclobber=not interactive) File /usr/lib/python2.6/site-packages/django/db/backends/creation.py, line 327, in create_test_db test_database_name = self._create_test_db(verbosity, autoclobber) File /usr/lib/python2.6/site-packages/django/db/backends/creation.py, line 363, in _create_test_db cursor = self.connection.cursor() File /usr/lib/python2.6/site-packages/django/db/backends/dummy/base.py, line 15, in complain raise ImproperlyConfigured, You haven't set the DATABASE_ENGINE setting yet. django.core.exceptions.ImproperlyConfigured: You haven't set the DATABASE_ENGINE setting yet. On Tuesday, April 20, 2010, Stephen Gallagherstep...@gallagherhome.com wrote: On 04/20/2010 11:26 AM, Stephen Gallagher wrote: Sorry, maybe I was unclear. By putting that log message where Scott recommended, I proved that send_review_mail() was not being called at all (the log message never printed). So I'm trying to figure out how to track down the misconfiguration. Upon further investigation, it looks like the callback hooks for notifications are never being set up. I set a raise SyntaxError in reviewboard.notifications.email.connect_signals() and it never fired (and ReviewBoard continued to operate normally) So... can anyone tell me why notifications aren't being set up? -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
It shouldn't work for just one or the other. Try running ./contrib/internal/prepare-dev.py. That connect_signals should be happening on the first request to Review Board. Are you running this using fastcgi or mod_python? Might also be worth checking to make sure that the following points are also hit: reviewboard/__init__.py: initialize reviewboard/notifications/__init__.py: connect_signals For what it's worth, e-mail notifications have been working here with 1.5 beta 1. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Tue, Apr 20, 2010 at 12:03 PM, Stephen Gallagher step...@gallagherhome.com wrote: On 04/20/2010 02:48 PM, Christian Hammond wrote: Good question... Can you run the test suite from a source tree and see if anything fails? (./reviewboard/manage.py test) Christian Getting a traceback trying to run the tests. I'm using the contrib/conf/settings_local.py.tmpl as the settings_local.py in the root of the reviewboard directory. Running ./contrib/internal/devserver.sh works fine in this configuration. $ ./reviewboard/manage.py test Running dependency checks (set DEBUG=False to turn this off)... Warning: p4python (=07.3) not found. Perforce integration will not work. Warning: hg not found. Mercurial integration will not work. Warning: PyLucene (with JCC) is required to enable search. See the documentation for instructions. Warning: mtn binary not found. Monotone integration will not work. Please see http://www.reviewboard.org/docs/manual/dev/admin/ for help setting up Review Board. Creating test database... Traceback (most recent call last): File ./reviewboard/manage.py, line 138, in module execute_manager(settings) File /usr/lib/python2.6/site-packages/django/core/management/__init__.py, line 362, in execute_manager utility.execute() File /usr/lib/python2.6/site-packages/django/core/management/__init__.py, line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File /usr/lib/python2.6/site-packages/django/core/management/base.py, line 195, in run_from_argv self.execute(*args, **options.__dict__) File /usr/lib/python2.6/site-packages/django/core/management/base.py, line 222, in execute output = self.handle(*args, **options) File /usr/lib/python2.6/site-packages/django/core/management/commands/test.py, line 23, in handle failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive) File /home/bos/sgallagh/workspace/reviewboard/reviewboard/test.py, line 63, in runner connection.creation.create_test_db(verbosity, autoclobber=not interactive) File /usr/lib/python2.6/site-packages/django/db/backends/creation.py, line 327, in create_test_db test_database_name = self._create_test_db(verbosity, autoclobber) File /usr/lib/python2.6/site-packages/django/db/backends/creation.py, line 363, in _create_test_db cursor = self.connection.cursor() File /usr/lib/python2.6/site-packages/django/db/backends/dummy/base.py, line 15, in complain raise ImproperlyConfigured, You haven't set the DATABASE_ENGINE setting yet. django.core.exceptions.ImproperlyConfigured: You haven't set the DATABASE_ENGINE setting yet. On Tuesday, April 20, 2010, Stephen Gallagherstep...@gallagherhome.com wrote: On 04/20/2010 11:26 AM, Stephen Gallagher wrote: Sorry, maybe I was unclear. By putting that log message where Scott recommended, I proved that send_review_mail() was not being called at all (the log message never printed). So I'm trying to figure out how to track down the misconfiguration. Upon further investigation, it looks like the callback hooks for notifications are never being set up. I set a raise SyntaxError in reviewboard.notifications.email.connect_signals() and it never fired (and ReviewBoard continued to operate normally) So... can anyone tell me why notifications aren't being set up? -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know
Re: SMTP support/debugging
On 04/20/2010 03:31 PM, Christian Hammond wrote: It shouldn't work for just one or the other. Try running ./contrib/internal/prepare-dev.py. That connect_signals should be happening on the first request to Review Board. Are you running this using fastcgi or mod_python? Might also be worth checking to make sure that the following points are also hit: reviewboard/__init__.py: initialize reviewboard/notifications/__init__.py: connect_signals For what it's worth, e-mail notifications have been working here with 1.5 beta 1. Christian I figured out what I had wrong with the tests. They seem to be passing (except the API tests, but that's expected). To answer your question, I'm actually using mod_wsgi, not mod_python. Is there an extra step I need to take to make sure that initialization takes place? Also, reviewboard/notifications/__init__.py: connect_signals is where I put my log message that was never printed. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
On 04/20/2010 03:37 PM, Christian Hammond wrote: I'm not sure whether mod_wsgi would be somehow different or not. initialize is called in reviewboard/urls.py, which should definitely be invoked regardless. If you're seeing the Log file for Review Board ... in the log files, then you should be seeing signal connections. That is, unless something broke in Django's signals, but you're using Django 1.1.x, right? Christian Yeah, I'm using Django 1.1.1 on Red Hat Enterprise Linux 5. I have no plans to move to Django 1.2. I'm definitely seeing Log file for Review Board ... appearing. But when I put logging.info(connect_signals) in connect_signals(), it never prints. I suppose it could be a red herring. Is it possible that the logger won't work at that level? -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
SMTP support/debugging
I'm almost there with my ReviewBoard deployment, but I can't figure out why it doesn't seem to be sending emails for reviews/review updates. Can anyone here point me at a good way to debug the problem? The SMTP server doesn't seem to be receiving anything, so I'm pretty sure the problem is on ReviewBoard's side. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SMTP support/debugging
Here is what I did with V 1.0 when I had an email issue, in reviewboard/reviews/email.py In function def send_review_mail(user, review_request, subject, in_reply_to, extra_recipients, template_name, context={}): I added the line: logging.info(Sending e-mail with subject '%s' from '%s' to '%s', CC '%s'\n % (subject, from_email, to_field, cc_field)) just before this line: message.send() Looking at the return value of send would also be a potential way to debug it, my problem was a very slow and overloaded smtp server. My solution was to setup postfix on the local machine. It then sends it to the smtp server. This now means that some emails are slightly delayed (a few minutes) but has increased reliability. Scott On Mon, Apr 19, 2010 at 5:15 PM, Stephen Gallagher step...@gallagherhome.com wrote: I'm almost there with my ReviewBoard deployment, but I can't figure out why it doesn't seem to be sending emails for reviews/review updates. Can anyone here point me at a good way to debug the problem? The SMTP server doesn't seem to be receiving anything, so I'm pretty sure the problem is on ReviewBoard's side. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en