New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error emails never sent #931
Comments
What exact version of Celery is this? I just tried to enable it with an invalid server and got this error: [2012-08-24 16:26:20,252: WARNING/MainProcess] /opt/devel/celery/celery/utils/mail.py:81: SendmailWarning: Mail could not be sent: timeout('timed out',) {'To': 'ask@celeryproject.org', 'Subject': u"[celery@halcyon.local] Error: Task tasks.raising (db4253ca-9788-42e5-80a9-d22873b75d27): KeyError('foo',)"} |
Btw, I just tried it with a correct setup as well and it works well for me. Here's my (censored) email settings:
You can easily test your settings using the
|
This is celery 3.0.5. Manually calling mail_admins with the same configuration as normal does work. This is consistent with what I saw before - sending email is not even attempted when a task throws an exception. I tried again with an exception-throwing task, but it did not work. Now I'm seeing this error, which seems to happen intermittently: [2012-08-28 11:29:03,886: INFO/MainProcess] Got task from broker: test_exception[0719b190-630f-4123-ad74-23af74ff48e4] Looks like this is the offending line: https://github.com/celery/celery/blob/v3.0.5/celery/utils/mail.py#L182 . It's still in 3.0.7. I'm confused as to why this works for some people. I'll do more investigation... |
Ah, so that's probably the problem. The new task class does not define |
Hey! I finally got an error email! I changed the @task annotation to include error_whitelist @celery.task(name="test_exception",error_whitelist=[]) I'm pretty sure that is deprecated so this should not be necessary. |
I'm still having this problem with celery 3.0.11 |
@yeago Have you tried upgrading to 3.0.21? |
Any idea? That's after upgrading. ...ignore that, I hadn't appropriately updated kombu. |
Hey there, Yeah, I upgraded just fine and still no emails! |
Do you get error email when you set an error_whitelist (which is what this issue is about), if not then this is a new issue. Are you able to send mails using the setting you have configured? Try:
|
Nothing happens. No email, no error. I am probably initializing it incorrectly. When I tried your method I got (mmdb)mmdb@vii-mmdb-app1:~/code/mmdb$ celery -A myproj |
Note, I had this problem up to version 3.1.1. I began receiving error emails again after I upgraded to 3.1.7. |
See mailing list thread: https://groups.google.com/forum/?fromgroups=#!topic/celery-users/Ayxd6ddvNs0%5B1-25%5D
With CELERY_SEND_TASK_ERROR_EMAILS = True, no error emails are ever sent. I have not gotten a single one to work since upgrading to 3.0.
I have a task that references an unknown variable (and raises NameError). It records the task and the error in the celery log, but it never sends an email. No SMTP connection is attempted, so it's not my credentials.
I'm not sure what else to do. Again, see the thread for more details.
Craig Younkins
The text was updated successfully, but these errors were encountered: