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를 다시 시작했는데 갑자기 모든 것이 작동하기 시작했습니다. 교훈: 재부팅의 힘을 과소평가하지 마십시오!

관련 정보