Bug 880597
Summary: | ovirt-engine-notification-service : Notification service fails to send email notification when $MAIL_FROM is not defined ( Failed to dispatch message java.lang.NullPointerException ) | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Oded Ramraz <oramraz> | ||||
Component: | ovirt-engine-notification-service | Assignee: | Yair Zaslavsky <yzaslavs> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ilanit Stein <istein> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 3.1.0 | CC: | dyasny, iheim, italkohe, masayag, oourfali, Rhev-m-bugs, sgrinber, ykaul | ||||
Target Milestone: | --- | Keywords: | ZStream | ||||
Target Release: | 3.2.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | infra | ||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 884242 (view as bug list) | Environment: | |||||
Last Closed: | Type: | Bug | |||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 915537 | ||||||
Attachments: |
|
Description
Oded Ramraz
2012-11-27 12:10:17 UTC
Created attachment 652645 [details]
notifier log
When the MAIL_FROM properties isn't set on [1], the notification service tries to populate it with the same value as provided by MAIL_USER. Neither MAIL_USER nor MAIL_FROM are mandatory for sending the email. However, if the message dispatch operations fails, an information is logged about the error the message details including the sender (MAIL_FROM). Since this field wasn't set - the NPE is thrown. The following is taken from [2], line 178 log.error(String.format("Failed to send message from [%s] to [%s] with subject [%s] due to error: [%s]", from.toString()...) from.toString() causes the NPE. [1] /etc/ovirt-engine/notifier/notifier.conf [2] ovirt-engine/backend/manager/tools/engine-notifier/engine-notifier-service/src/main/java/org/ovirt/engine/core/notifier/utils/sender/mail/JavaMailSender.java Suggested patch upstream - http://gerrit.ovirt.org/#/c/9726/2 Verified on si27: Put MAIL_USER & MAIL_FROM in comment. Notification email sent, and no dispatch message or exception error seen in the notifier.log 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released |