Logstash 1.5.1 Twitter Input Connection Refused


#1

Hi,

Getting connection refused error when trying to use Twitter input on Logstash 1.5.1.
I would appreciate any help. Thanks.

input {
    twitter {
        consumer_key => " "
        consumer_secret => " "
        oauth_token => " "
        oauth_token_secret => " "
        keywords => ["test"]
    }
}

output {
    stdout {}
}

bin/logstash agent -f logstash-twitter.conf

io/console not supported; tty will not be manipulated
Logstash startup completed
←[33mConnection refused - Connection refused {:exception=>#<Errno::ECONNREFUSED: Connection refused - Connection refused
, :backtrace=>["org/jruby/ext/socket/RubyTCPSocket.java:126:in initialize'", "org/jruby/RubyIO.java:853:innew'", "C:
/Users/Michael_Wang3/Documents/logstash-1.5.1/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/connecti
on.rb:16:in stream'", "C:/Users/Michael_Wang3/Documents/logstash-1.5.1/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/ twitter/streaming/client.rb:116:inrequest'", "C:/Users/Michael_Wang3/Documents/logstash-1.5.1/vendor/bundle/jruby/1.9/
gems/twitter-5.12.0/lib/twitter/streaming/client.rb:36:in filter'", "C:/Users/Michael_Wang3/Documents/logstash-1.5.1/ve ndor/bundle/jruby/1.9/gems/logstash-input-twitter-0.1.6/lib/logstash/inputs/twitter.rb:88:inrun'", "C:/Users/Michael_W
ang3/Documents/logstash-1.5.1/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.1-java/lib/logstash/pipeline.rb:176:in inp utworker'", "C:/Users/Michael_Wang3/Documents/logstash-1.5.1/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.1-java/lib/l ogstash/pipeline.rb:170:instart_input'"], :level=>:warn}←[0m


(Mark Walkom) #2

Firewall?

Try running with --debug and see what is returned.


#3
←[36mReading config file {:file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-co
re-1.5.2.2-java/lib/logstash/agent.rb", :level=>:debug, :line=>"295", :method=>"local_config"}←[0m
←[36mCompiled pipeline code:
        @inputs = []
        @filters = []
        @outputs = []
        @periodic_flushers = []
        @shutdown_flushers = []

          @input_twitter_1 = plugin("input", "twitter", LogStash::Util.hash_merge_many({ "consumer_key" => ("5ZiqIWE3rvU
sVJLZNKG6lTg6Q") }, { "consumer_secret" => ("e9nkVNcZIAq9g3kXCvm3jO9a2WJiP6gJvHh1gUfxXi3brm3JZB") }, { "oauth_token" =>
("3266469944-OU4bf87r34Fds1y4UN7xF9strjzvFvH327KQ8UK") }, { "oauth_token_secret" => ("FhWn1FRbnW46iJfC6IyT2F4mmkLiSlFw3P
5ZZhZUfQAxu") }, { "keywords" => [("Dell")] }, { "full_tweet" => ("true") }))

          @inputs << @input_twitter_1

          @output_elasticsearch_2 = plugin("output", "elasticsearch", LogStash::Util.hash_merge_many({ "host" => ("local
host") }, { "index" => ("twitter") }, { "document_type" => ("tweet") }))

          @outputs << @output_elasticsearch_2

          @output_stdout_3 = plugin("output", "stdout", LogStash::Util.hash_merge_many({ "codec" => ("rubydebug") }))

          @outputs << @output_stdout_3

  def filter_func(event)
    events = [event]
    @logger.debug? && @logger.debug("filter received", :event => event.to_hash)
    events
  end
  def output_func(event)
    @logger.debug? && @logger.debug("output received", :event => event.to_hash)
    @output_elasticsearch_2.handle(event)
    @output_stdout_3.handle(event)

  end {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-
1.5.2.2-java/lib/logstash/pipeline.rb", :line=>"28", :method=>"initialize"}←[0m
←[36mPlugin not defined in namespace, checking for plugin file {:type=>"input", :name=>"twitter", :path=>"logstash/input
s/twitter", :level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-
core-1.5.2.2-java/lib/logstash/plugin.rb", :line=>"133", :method=>"lookup"}←[0m
←[36mPlugin not defined in namespace, checking for plugin file {:type=>"codec", :name=>"plain", :path=>"logstash/codecs/
plain", :level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core
-1.5.2.2-java/lib/logstash/plugin.rb", :line=>"133", :method=>"lookup"}←[0m
←[36mconfig LogStash::Codecs::Plain/@charset = "UTF-8" {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-
1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"con
fig_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@consumer_key = "5ZiqIWE3rvUsVJLZNKG6lTg6Q" {:level=>:debug, :file=>"/Users/Michae
l_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb",
:line=>"112", :method=>"config_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@consumer_secret = <password> {:level=>:debug, :file=>"/Users/Michael_Wang3/Docume
nts/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112",
:method=>"config_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@oauth_token = "3266469944-OU4bf87r34Fds1y4UN7xF9strjzvFvH327KQ8UK" {:level=>:debu
g, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/log
stash/config/mixin.rb", :line=>"112", :method=>"config_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@oauth_token_secret = <password> {:level=>:debug, :file=>"/Users/Michael_Wang3/Doc
uments/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112
", :method=>"config_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@keywords = ["Dell"] {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logst
ash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>
"config_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@full_tweet = true {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstas
h-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"c
onfig_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@debug = false {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.
5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"confi
g_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@codec = <LogStash::Codecs::Plain charset=>"UTF-8"> {:level=>:debug, :file=>"/User
s/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mix
in.rb", :line=>"112", :method=>"config_init"}←[0m
←[36mconfig LogStash::Inputs::Twitter/@add_field = {} {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1
.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"conf
ig_init"}←[0m
←[36mPlugin not defined in namespace, checking for plugin file {:type=>"output", :name=>"elasticsearch", :path=>"logstas
h/outputs/elasticsearch", :level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/
gems/logstash-core-1.5.2.2-java/lib/logstash/plugin.rb", :line=>"133", :method=>"lookup"}←[0m
←[36mconfig LogStash::Codecs::Plain/@charset = "UTF-8" {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-
1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"con
fig_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@host = ["localhost"] {:level=>:debug, :file=>"/Users/Michael_Wang3/Documen
ts/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :
method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@index = "twitter" {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/
logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :met
hod=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@document_type = "tweet" {:level=>:debug, :file=>"/Users/Michael_Wang3/Docu
ments/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112"
, :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@type = "" {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash
-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"co
nfig_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@tags = [] {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash
-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"co
nfig_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@exclude_tags = [] {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/
logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :met
hod=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@codec = <LogStash::Codecs::Plain charset=>"UTF-8"> {:level=>:debug, :file=
>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/con
fig/mixin.rb", :line=>"112", :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@workers = 1 {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logsta
sh-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"
config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@manage_template = true {:level=>:debug, :file=>"/Users/Michael_Wang3/Docum
ents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112",
 :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@template_name = "logstash" {:level=>:debug, :file=>"/Users/Michael_Wang3/D
ocuments/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"1
12", :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@template_overwrite = false {:level=>:debug, :file=>"/Users/Michael_Wang3/D
ocuments/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"1
12", :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@embedded = false {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/l
ogstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :meth
od=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@embedded_http_port = "9200-9300" {:level=>:debug, :file=>"/Users/Michael_W
ang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :li
ne=>"112", :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@max_inflight_requests = 50 {:level=>:debug, :file=>"/Users/Michael_Wang3/D
ocuments/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"1
12", :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@flush_size = 5000 {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/
logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :met
hod=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@idle_flush_time = 1 {:level=>:debug, :file=>"/Users/Michael_Wang3/Document
s/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :m
ethod=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@action = "index" {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/l
ogstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :meth
od=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@path = "/" {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstas
h-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"c
onfig_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@ssl = false {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logsta
sh-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"
config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@ssl_certificate_verification = true {:level=>:debug, :file=>"/Users/Michae
l_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb",
:line=>"112", :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@sniffing = false {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/l
ogstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :meth
od=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@max_retries = 3 {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/lo
gstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :metho
d=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@retry_max_items = 5000 {:level=>:debug, :file=>"/Users/Michael_Wang3/Docum
ents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112",
 :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::ElasticSearch/@retry_max_interval = 5 {:level=>:debug, :file=>"/Users/Michael_Wang3/Docum
ents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112",
 :method=>"config_init"}←[0m
←[36mPlugin not defined in namespace, checking for plugin file {:type=>"output", :name=>"stdout", :path=>"logstash/outpu
ts/stdout", :level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-
core-1.5.2.2-java/lib/logstash/plugin.rb", :line=>"133", :method=>"lookup"}←[0m
←[36mPlugin not defined in namespace, checking for plugin file {:type=>"codec", :name=>"rubydebug", :path=>"logstash/cod
ecs/rubydebug", :level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logst
ash-core-1.5.2.2-java/lib/logstash/plugin.rb", :line=>"133", :method=>"lookup"}←[0m
←[36mconfig LogStash::Codecs::RubyDebug/@metadata = false {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logsta
sh-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"
config_init"}←[0m
←[36mconfig LogStash::Outputs::Stdout/@codec = <LogStash::Codecs::RubyDebug > {:level=>:debug, :file=>"/Users/Michael_Wa
ng3/Documents/logstash-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :lin
e=>"112", :method=>"config_init"}←[0m
←[36mconfig LogStash::Outputs::Stdout/@type = "" {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/
vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"config_in
it"}←[0m
←[36mconfig LogStash::Outputs::Stdout/@tags = [] {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.2/
vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"config_in
it"}←[0m
←[36mconfig LogStash::Outputs::Stdout/@exclude_tags = [] {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstas
h-1.5.2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"c
onfig_init"}←[0m
←[36mconfig LogStash::Outputs::Stdout/@workers = 1 {:level=>:debug, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.
2/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/config/mixin.rb", :line=>"112", :method=>"config_
init"}←[0m
←[32mStarting twitter tracking {:keywords=>["Dell"], :level=>:info, :file=>"/Users/Michael_Wang3/Documents/logstash-1.5.
2/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-1.0.1/lib/logstash/inputs/twitter.rb", :line=>"86", :method=>"run"
}←[0m

(Kyle) #4

Hi,
Have you finished this problem? I'm also suffering this issue.


#5

Hi,

I'm not working on this anymore, but my issue was with my company's firewall not allowing the Twitter connection.


(Mark Walkom) #6

This is 5 months old, please start your own thread.


(system) #7