Twitter client error - connection refused

This is some what same as

my logstash.conf is

input {
twitter {
# add your data
consumer_key => "x"
consumer_secret => "x"
oauth_token => "x"
oauth_token_secret => "x"
keywords => ["GameSpot"]
full_tweet => true
# below lines are commented
#use_proxy => true
#proxy_address => "http://ip"
#proxy_port => port
}
}
output {
elasticsearch {
hosts => ["127.0.0.1:9200"]
index => "idx_ls"
}
}

And the error that i get is

10:28:39.716 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
10:28:39.718 [[main]"GameSpot"}
10:28:39.775 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
10:30:46.969 [[main]"Connection refused - Connection refused", :exception=>"Errno::ECONNREFUSED", :backtrace=>["org/jruby/ext/socket/RubyTCPSocket.java:126:in initialize'", "org/jruby/RubyIO.java:871:innew'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter/patches.rb:26:in stream'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter/patches.rb:58:inrequest'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:37:in filter'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter.rb:138:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:425:in inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:419:instart_input'"], :options=>nil}

Where do i have to specify proxy settings?

in my linux terminal when i execute the export command i can see
declare -x http_proxy="http://ip:port"
declare -x https_proxy="https://ip:port"

Please can someone suggest how can i fetch data from twitter?

Do you have a proxy in place? Most of the time I have seen this error, it's been caused by bad auth details.

Yes i do have a proxy behind.

I have also mentioned the same in the post.

I know the proxy ip and port but the problem is that i don't know where and how to make changes (environment variables, jvm and what all).

Just for information i have installed elk stack using vagrant on ubuntu.

Looking forward to your reply.

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