Logstash-Twitter input error "undefined method `filter' for nil:NilClass"

Hello.
I have been facing issues using the 'Twitter input' in Logstash.

LS version : 8.2.2
ES version : 8.2.2

When I run Logstash, Twit are not indexed and the error message below continues to appear.
Did I write the wrong conf?

My conf :

input {
  twitter {
    consumer_key => '...'
    consumer_secret => '...'
    oauth_token => '...'
    oauth_token_secret => '...'
    keywords => [ 'movie' ]
    full_tweet => true
  }
}

output {
  stdout{}
  elasticsearch {...}
}

My error message :

[WARN ][logstash.inputs.twitter  ][main][769449a2c68ca17191f561d453ab954bfe14e4511bf4a3c08899fb830b92d71d] Twitter client error {:message=>"undefined method `filter' for nil:NilClass", :exception=>NoMethodError, :backtrace=>["/home/elastic/logstash-8.4.3/vendor/bundle/jruby/2.6.0/gems/logstash-input-twitter-4.1.0/lib/logstash/inputs/twitter.rb:166:in `do_run'", "/home/elastic/logstash-8.4.3/vendor/bundle/jruby/2.6.0/gems/logstash-input-twitter-4.1.0/lib/logstash/inputs/twitter.rb:146:in `run'", "/home/elastic/logstash-8.4.3/logstash-core/lib/logstash/java_pipeline.rb:410:in `inputworker'", "/home/elastic/logstash-8.4.3/logstash-core/lib/logstash/java_pipeline.rb:401:in `block in start_input'"], :options=>nil}

Most likely you need to add filter {} above output {

That is failing here. @stream_client is set here. I would expect that to have logged an exception earlier if it failed.

Thanks for your reply, Rios. :smile:
actually I wrote the filter{} above output{}, but same error occur. :disappointed_relieved:
I'll check the other parts by referring to the other reply below.

Thanks for your reply, Badger. :smile:
I'll check the code and write again when I know what the problem is or have another questions.

Well, sometimes older versions have small issues/bugs when and we all(integrators) hope that we made mistake. Developers are always last fault. :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.