Getting an odd error when trying to send a report, looking at the Report History,
Report could not be sent, please review your Graylog server email settings.
But, if I go in to Notifications, send a test notification => it works fine, email received! So it seems that my email configuration is in fact correct … some issue with Report email it appears?
FYI, was thinking this was the manual email I added somehow … so created a user (w/email address), tried to send to that account (instead). Still get the error (snipped from the log),
2021-03-27T13:39:10.611-05:00 INFO [SystemJobManager] Submitted SystemJob <b8771630-8f2b-11eb-b7e7-52540045151b> [org.graylog.plugins.report.scheduler.ReportRenderSystemJob]
2021-03-27T13:39:10.687-05:00 INFO [ProtocolHandshake] Detected dialect: OSS
2021-03-27T13:39:15.230-05:00 ERROR [ReportRenderJob] Failed to send report:
javax.mail.SendFailedException: Couldn't deliver email!
at org.graylog.plugins.report.sender.EmailReportSender.sendTo(EmailReportSender.java:51) ~[graylog-plugin-enterprise-4.0.5.jar:?]
at org.graylog.plugins.report.api.ReportService.sendEmails(ReportService.java:276) ~[graylog-plugin-enterprise-4.0.5.jar:?]
at org.graylog.plugins.report.scheduler.ReportRenderJob.doRun(ReportRenderJob.java:91) [graylog-plugin-enterprise-4.0.5.jar:?]
at org.graylog.plugins.report.scheduler.ReportRenderJob.run(ReportRenderJob.java:60) [graylog-plugin-enterprise-4.0.5.jar:?]
at org.graylog.plugins.report.scheduler.ReportRenderSystemJob.execute(ReportRenderSystemJob.java:25) [graylog-plugin-enterprise-4.0.5.jar:?]
at org.graylog2.system.jobs.SystemJobManager$1.run(SystemJobManager.java:89) [graylog.jar:?]
at com.codahale.metrics.InstrumentedScheduledExecutorService$InstrumentedRunnable.run(InstrumentedScheduledExecutorService.java:241) [graylog.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_282]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_282]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_282]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_282]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_282]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_282]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Caused by: java.lang.NullPointerException
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:696) ~[graylog.jar:?]
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:655) ~[graylog.jar:?]
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:115) ~[graylog.jar:?]
at org.apache.commons.mail.Email.createInternetAddress(Email.java:1949) ~[graylog.jar:?]
at org.apache.commons.mail.Email.setFrom(Email.java:757) ~[graylog.jar:?]
at org.apache.commons.mail.Email.setFrom(Email.java:740) ~[graylog.jar:?]
at org.apache.commons.mail.Email.setFrom(Email.java:720) ~[graylog.jar:?]
at org.graylog.plugins.report.sender.EmailReportSender.sendEmail(EmailReportSender.java:109) ~[graylog-plugin-enterprise-4.0.5.jar:?]
at org.graylog.plugins.report.sender.EmailReportSender.sendEmails(EmailReportSender.java:65) ~[graylog-plugin-enterprise-4.0.5.jar:?]
at org.graylog.plugins.report.sender.EmailReportSender.sendTo(EmailReportSender.java:49) ~[graylog-plugin-enterprise-4.0.5.jar:?]
... 13 more
2021-03-27T13:39:15.243-05:00 INFO [SystemJobManager] SystemJob <b8771630-8f2b-11eb-b7e7-52540045151b> [org.graylog.plugins.report.scheduler.ReportRenderSystemJob] finished in 4632ms.
You are very likely correct … but, where is this set? Asking as Notifications work fine - that email information is configured in the server.conf file.
so I had a quick look, the Notifcations can still work if the Sender field is filled out correctly.
In other words: In the code for notifications the Sender field will be set as from instead of what is written in the config.
I tested both Notification and Report and it seems to be working for me. So again I assume you have a invalid email address in your graylog configuration file.
You were right, thanks! 2x4 to the head - I got it … . It’s a bit odd, Notifications and reports are in different locations. I missed it in server.conf - had the other parameters set, just not this one.
BTW, it’s interesting - this is an internal only error (as my email server doesn’t require this to be set). But good to know about it.