# Twitter Client Error "Connection Refused"

**URL:** <https://discuss.elastic.co/t/twitter-client-error-connection-refused/66205>\
**Category:** Logstash\
**Created:** [November 16, 2016, 6:25am UTC](https://discuss.elastic.co/t/twitter-client-error-connection-refused/66205 "2016-11-16T06:25:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas\_Reddy\_Aravabhu](https://avatars.discourse-cdn.com/v4/letter/v/f9ae1b/32.png) [@Vikas\_Reddy\_Aravabhu](https://discuss.elastic.co/u/Vikas_Reddy_Aravabhu)\
**Post date:** [November 16, 2016, 6:25am UTC](https://discuss.elastic.co/t/twitter-client-error-connection-refused/66205/1 "2016-11-16T06:25:24Z")

</div>

Twitter client error {:message=\>"Connection refused - Connection refused", :exception=\>"Errno::ECONNREFUSED", :backtrace=\>["org/jruby/ext/socket/RubyTCPSocket.java:126:in `initialize'", "org/jruby/RubyIO.java:871:in`new'", "/root/logstash-5.0.0/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter/patches.rb:26:in `stream'", "/root/logstash-5.0.0/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter/patches.rb:58:in`request'", "/root/logstash-5.0.0/vendor/bundle/jruby/1.9/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:37:in `filter'", "/root/logstash-5.0.0/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-3.0.3/lib/logstash/inputs/twitter.rb:138:in`run'", "/root/logstash-5.0.0/logstash-core/lib/logstash/pipeline.rb:331:in `inputworker'", "/root/logstash-5.0.0/logstash-core/lib/logstash/pipeline.rb:325:in`start\_input'"], :options=\>nil}

twitter.conf

input {  
twitter {  
consumer\_key =\> "x"  
consumer\_secret =\> "x"  
oauth\_token =\> "x"  
oauth\_token\_secret =\> "x"  
keywords =\> ["modi"]  
full\_tweet =\> "true"

```
    }

```

}  
output {  
elasticsearch { hosts =\> ["localhost:9200"]  
index =\> "twitter"  
document\_type =\> "realtime"  
}  
stdout { codec =\> rubydebug }  
}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 20, 2016, 4:33pm UTC](https://discuss.elastic.co/t/twitter-client-error-connection-refused/66205/2 "2016-11-20T16:33:08Z")

</div>

Is there a proxy or firewall in the way?

---

<div class="post-metadata">

**Author:** ![Vikas\_Reddy\_Aravabhu](https://avatars.discourse-cdn.com/v4/letter/v/f9ae1b/32.png) [@Vikas\_Reddy\_Aravabhu](https://discuss.elastic.co/u/Vikas_Reddy_Aravabhu)\
**Post date:** [November 21, 2016, 2:03am UTC](https://discuss.elastic.co/t/twitter-client-error-connection-refused/66205/3 "2016-11-21T02:03:54Z")

</div>

I gave the proxy and port number. Now it is working fine.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 19, 2016, 2:04am UTC](https://discuss.elastic.co/t/twitter-client-error-connection-refused/66205/4 "2016-12-19T02:04:30Z")

</div>

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