I'm trying to implement this example in my lab -> https://github.com/elastic/examples/tree/master/ElasticStack_twitter
I'm using version 5.2.1
But when I start logstash I'm seeing below errors ->
[2017-03-16T22:32:23,330][WARN ][logstash.inputs.twitter ] Twitter client error {:message=>"", :exception=>"Twitter::Error::Unauthorized", :backtrace=>["/Desktop/elastic/logstash-5.2.1/vendor/bundle/jruby/1.9/gems/twitter-5.15.0/lib/twitter/streaming/response.rb:21:in on_headers_complete'", "org/ruby_http_parser/RubyHttpParser.java:370:in
<<'", "/Desktop/elastic/logstash-5.2.1/vendor/bundle/jruby/1.9/gems/twitter-5.15.0/lib/twitter/streaming/response.rb:16:in <<'", "/Desktop/elastic/logstash-5.2.1/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter/patches.rb:31:in
stream'", "/Desktop/elastic/logstash-5.2.1/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter/patches.rb:58:in `request'" and so on.
After trying to hit ctrl c it gives me this error ->
[2017-03-16T22:32:27,820][WARN ][logstash.inputs.twitter ] Twitter client error {:message=>"undefined method filter' for nil:NilClass", :exception=>"NoMethodError", :backtrace=>["/Desktop/elastic/logstash-5.2.1/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter.rb:138:in
run'", "/Desktop/elastic/logstash-5.2.1/logstash-core/lib/logstash/pipeline.rb:370:in inputworker'", "/Desktop/elastic/logstash-5.2.1/logstash-core/lib/logstash/pipeline.rb:364:in
start_input'"], :options=>nil}
My logstash.conf file ->
input {
twitter {
consumer_key => ""
consumer_secret => ""
oauth_token => ""
oauth_token_secret => ""
keywords => [ "thor", "marvel"]
full_tweet => true
#locations => "-95.71289100000001,37.09024"
}
}
filter { }
output {
stdout {
codec => dots
}
elasticsearch {
hosts => "localhost:9200"
index => "twitter_elastic_example"
document_type => "tweets"
template => "/Desktop/elastic/twitter_elastic_example/twitter_template.json"
template_name => "twitter_elastic_example"
template_overwrite => true
}
}
This is not a proxy issue. The date and time is correct on my machine so that's not an issue too.
It was working a few days ago with the same version and everything but I just wiped everything, re-installed it and now facing this. Already tried version 5.2.2, no help.
Tried changing keywords as well.
Further research suggests this link -> https://github.com/elastic/logstash/issues/5834
Am I hitting above bug? Is there any workaround for it?
It still does not explain why it was working before though.