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

Graylog v1.1.0-beta.2 - Unable to send mail (alert callbacks) #1346

Closed
reivier77 opened this Issue May 28, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@reivier77

reivier77 commented May 28, 2015

Since I upgraded the virtual appliance (1.0) to Graylog v1.1.0-beta.2, I'm unable to send email alert callbacks. Even the "send test alert" fails.

Here is the exception:

An error occurred while trying to send an email!
The Graylog server encountered an error while trying to send an email. This is the detailed error message: org.apache.commons.mail.EmailException: javax.mail.internet.AddressException: Illegal address in string '' (javax.mail.internet.AddressException: Illegal address in string'')

@dennisoelkers dennisoelkers self-assigned this May 28, 2015

@dennisoelkers

This comment has been minimized.

Contributor

dennisoelkers commented May 28, 2015

Do you have more information, e.g. a bigger stack trace, in your server logs?

@dennisoelkers

This comment has been minimized.

Contributor

dennisoelkers commented May 28, 2015

I am assuming at the moment that either the from address in your server or in your email alarm callback config is not set/invalid. Is that possible?

@reivier77

This comment has been minimized.

reivier77 commented May 28, 2015

From the /var/log/graylog/server/current log:

2015-05-28_14:38:53.85954 org.apache.commons.mail.EmailException: javax.mail.internet.AddressException: Illegal address in string '' 2015-05-28_14:38:53.85955 at org.apache.commons.mail.Email.createInternetAddress(Email.java:1920) 2015-05-28_14:38:53.85956 at org.apache.commons.mail.Email.setFrom(Email.java:749) 2015-05-28_14:38:53.85956 at org.apache.commons.mail.Email.setFrom(Email.java:732) 2015-05-28_14:38:53.85957 at org.apache.commons.mail.Email.setFrom(Email.java:712) 2015-05-28_14:38:53.85957 at org.graylog2.alerts.StaticEmailAlertSender.sendEmail(StaticEmailAlertSender.java:101) 2015-05-28_14:38:53.85958 at org.graylog2.alerts.StaticEmailAlertSender.sendEmails(StaticEmailAlertSender.java:235) 2015-05-28_14:38:53.85958 at org.graylog2.alerts.StaticEmailAlertSender.sendEmails(StaticEmailAlertSender.java:76) 2015-05-28_14:38:53.85959 at org.graylog2.alarmcallbacks.EmailAlarmCallback.call(EmailAlarmCallback.java:69) 2015-05-28_14:38:53.85962 at org.graylog2.rest.resources.streams.alerts.StreamAlertReceiverResource.sendDummyAlert(StreamAlertReceiverResource.java:168) 2015-05-28_14:38:53.85963 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2015-05-28_14:38:53.85964 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2015-05-28_14:38:53.85965 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2015-05-28_14:38:53.85965 at java.lang.reflect.Method.invoke(Method.java:497) 2015-05-28_14:38:53.85966 at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) 2015-05-28_14:38:53.85966 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:164) 2015-05-28_14:38:53.85967 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:181) 2015-05-28_14:38:53.85967 at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:158) 2015-05-28_14:38:53.85968 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101) 2015-05-28_14:38:53.85968 at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) 2015-05-28_14:38:53.85970 at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) 2015-05-28_14:38:53.85970 at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) 2015-05-28_14:38:53.85970 at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:305) 2015-05-28_14:38:53.85971 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) 2015-05-28_14:38:53.85971 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) 2015-05-28_14:38:53.85972 at org.glassfish.jersey.internal.Errors.process(Errors.java:315) 2015-05-28_14:38:53.85972 at org.glassfish.jersey.internal.Errors.process(Errors.java:297) 2015-05-28_14:38:53.85973 at org.glassfish.jersey.internal.Errors.process(Errors.java:267) 2015-05-28_14:38:53.85973 at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) 2015-05-28_14:38:53.85974 at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:288) 2015-05-28_14:38:53.85974 at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1110) 2015-05-28_14:38:53.85974 at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356) 2015-05-28_14:38:53.85975 at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) 2015-05-28_14:38:53.85976 at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) 2015-05-28_14:38:53.85977 at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) 2015-05-28_14:38:53.85977 at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) 2015-05-28_14:38:53.85978 at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) 2015-05-28_14:38:53.85978 at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) 2015-05-28_14:38:53.85978 at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:622) 2015-05-28_14:38:53.85979 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2015-05-28_14:38:53.85979 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2015-05-28_14:38:53.85980 at java.lang.Thread.run(Thread.java:745) 2015-05-28_14:38:53.85981 Caused by: javax.mail.internet.AddressException: Illegal address in string''
2015-05-28_14:38:53.85983 at javax.mail.internet.InternetAddress.(InternetAddress.java:114)
2015-05-28_14:38:53.85983 at org.apache.commons.mail.Email.createInternetAddress(Email.java:1895)
2015-05-28_14:38:53.85983 ... 40 more

Actually, before the upgarde everything was working fine. After the upgrade, I lost the email alarm callback and I had to recreate it.

graylog.conf:
transport_email_enabled = true
transport_email_hostname = serverfdqn
transport_email_port = 25

The sender/receiver are configured properly in the email alarm callback (as it was before the upgrade).

@dennisoelkers

This comment has been minimized.

Contributor

dennisoelkers commented May 29, 2015

Thanks for reporting this. I have fixed this in Graylog2/graylog2-server@4ef19d3 and it will be included in the rc that is supposed to be released very soon.

lennartkoopmann added a commit that referenced this issue May 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment