我目前正尝试使用Logstash的电子邮件插件。然而,Logstash的实例总是因ECONNREFUSED错误而崩溃。
这是我的config.conf文件的内容:
input {
generator {
lines => [ "logstash test: line 1" ]
count => 1
}
}
output {
email {
to => "stuff@stuff.com"
}
}
总是失败并出现以下错误:
Errno :: ECONNREFUSED:连接被拒绝 - 连接被拒绝在org / jruby / ext / socket / RubyTCPSocket.java初始化:126在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超时org / jruby / ext / timeout / Timeout.java:126 do_start at file:/ opt在/log / / / / / / / / / / / / / / jar / jruby-complete-1.7.11.jar!/ META -INF / jruby.home / lib / ruby / 1.9 / net / smtp.rb:519发送! at /opt/logstash/vendor/bundle/jruby/1.9/gems/mail-2.5.3/lib/mai l / network / delivery_methods / smtp.rb:136发送! at /opt/logstash/vendor/bundle/jruby/1.9/gems/mail-2.5.3/lib/mail/message.rb:245收到/opt/logstash/lib/logstash/outputs/email.rb:251句柄在/opt/logstash/lib/logstash/outputs/base.rb:86初始化为(eval):17调用org / jruby / RubyProc.java:271输出atopt/logstash/lib/logstash/pipeline.rb: 266输出工作者/opt/logstash/lib/logstash/pipeline.rb:225 start_outputs atopt/logstash/lib/logstash/pipeline.rb:152
答案 0 :(得分:0)
我正在使用default settings,因此Logstash尝试连接到localhost:25处的SMTP服务器,但是没有服务器在该地址进行侦听。
感谢MagnusBäck在评论中指出这一点。