Logstash エージェントは Redis サーバーにログを送信しません。

Logstash エージェントは Redis サーバーにログを送信しません。

LogstashからRedisサーバーにログを送信できません。次のエラーが発生します。

Failed to send event to redis {:event=>#<LogStash::Event:0x7ccb7867 @cancelled=false, @data={"message"=>"welocwelcome", "@timestamp"=>"2014-07-07T21:00:34.583Z", "@version"=>"1", "host"=>"localhost.localdomain"}>, :identity=>"default", :exception=>#<Errno::EHOSTUNREACH: No route to host - SocketChannel.connect>, :backtrace=>["org/jruby/ext/socket/RubyTCPSocket.java:123:in `initialize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:13:in `initialize'", "org/jruby/RubyIO.java:855:in `new'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:74:in `connect'", "org/jruby/ext/timeout/Timeout.java:127:in `timeout'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:73:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:180:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:273:in `establish_connection'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:69:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:292:in `ensure_connected'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:179:in `process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:258:in `logging'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:178:in `process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:84:in `call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:972:in `rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in `synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:210:in `mon_synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in `synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:971:in `rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/redis.rb:162:in `receive'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/base.rb:85:in `handle'", "(eval):21:in `initialize'", "org/jruby/RubyProc.java:271:in `call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:254:in `output'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:213:in `outputworker'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:140:in `start_outputs'"], :level=>:warn}

私のLogstash設定ファイルの内容は次のとおりです。

input { stdin { } }
output {
  stdout { codec => rubydebug }
  redis { host => "192.168.209.129" data_type => "list" key => "logstash" }
}

答え1

RedisとLogstashを再起動しましたが、突然すべてが機能し始めました。教訓:再起動の力を過小評価しないでください!

関連情報