Reputation: 3019
I currently try to use the email plugin of Logstash. The instance of Logstash however always crashes with a ECONNREFUSED error.
This is the content of my config.conf file:
input {
generator {
lines => [ "logstash test: line 1" ]
count => 1
}
}
output {
email {
to => "[email protected]"
}
}
It always fails with the following error:
Errno::ECONNREFUSED: Connection refused - Connection refused initialize at org/jruby/ext/socket/RubyTCPSocket.java:126 open at org/jruby/RubyIO.java:1178 tcp_socket at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/1.9/net/smtp.rb:540 do_start at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META -INF/jruby.home/lib/ruby/1.9/net/smtp.rb:549 timeout at org/jruby/ext/timeout/Timeout.java:126 do_start at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META -INF/jruby.home/lib/ruby/1.9/net/smtp.rb:549 start at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META -INF/jruby.home/lib/ruby/1.9/net/smtp.rb:519 deliver! at /opt/logstash/vendor/bundle/jruby/1.9/gems/mail-2.5.3/lib/mai l/network/delivery_methods/smtp.rb:136 deliver! at /opt/logstash/vendor/bundle/jruby/1.9/gems/mail-2.5.3/lib/mail/message.rb:245 receive at /opt/logstash/lib/logstash/outputs/email.rb:251 handle at /opt/logstash/lib/logstash/outputs/base.rb:86 initialize at (eval):17 call at org/jruby/RubyProc.java:271 output at /opt/logstash/lib/logstash/pipeline.rb:266 outputworker at /opt/logstash/lib/logstash/pipeline.rb:225 start_outputs at /opt/logstash/lib/logstash/pipeline.rb:152
Upvotes: 1
Views: 867
Reputation: 3019
I'm using the default settings, so Logstash is attempting to connect to the SMTP server at localhost:25, but no server is listening at that address.
Thanks Magnus Bäck for pointing that out in the comments.
Upvotes: 0