# Issue with connection message=\>"no address for stream.twitter.com"

**URL:** <https://discuss.elastic.co/t/issue-with-connection-message-no-address-for-stream-twitter-com/117983>\
**Category:** Logstash\
**Created:** [February 1, 2018, 9:32am UTC](https://discuss.elastic.co/t/issue-with-connection-message-no-address-for-stream-twitter-com/117983 "2018-02-01T09:32:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mir\_S](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Mir\_S](https://discuss.elastic.co/u/Mir_S)\
**Post date:** [February 1, 2018, 9:32am UTC](https://discuss.elastic.co/t/issue-with-connection-message-no-address-for-stream-twitter-com/117983/1 "2018-02-01T09:32:57Z")

</div>

Hi

I have an issue with the input twitter plugin:  
I'm using the official logstash docker container 6.1.3 from elastic . Created a Basic Pipelinefile as follow:

input {  
twitter {  
id =\> "id1"  
consumer\_key =\> ""  
consumer\_secret =\> ""  
oauth\_token =\> ""  
oauth\_token\_secret =\> ""  
keywords =\> ["news"]  
languages =\> ["en", "de"]  
}  
}

output {  
mongodb {  
id =\> "id2"  
uri =\> "mongodb://xxxx:27017"  
database =\> "news"  
collection =\> "tweets"  
}  
}

But when I start logstash I get the following error for this pipeline file:

[2018-02-01T09:02:54,649][WARN][logstash.inputs.twitter] Twitter client error {:message=\>"no address for [stream.twitter.com](http://stream.twitter.com)", :exception=\>"Resolv::ResolvError", :backtrace=\>["/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/resolv.rb:101:in getaddress'", "/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/resolv.rb:51:ingetaddress'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-twitter-3.0.7/lib/logstash/inputs/twitter/patches.rb:26:in stream'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-twitter-3.0.7/lib/logstash/inputs/twitter/patches.rb:58:inrequest'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:37:in filter'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-twitter-3.0.7/lib/logstash/inputs/twitter.rb:138:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:524:in inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:517:inblock in start\_input'"], :options=\>nil}

Did somebody have an idea what I have to change to get this working.  
We are not behind a proxy. A ping from the docker host pc to [stream.twitter.com](http://stream.twitter.com) resolves the address just fine.

Thanks for your help.  
BR

---

<div class="post-metadata">

**Author:** ![Mir\_S](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Mir\_S](https://discuss.elastic.co/u/Mir_S)\
**Post date:** [February 3, 2018, 7:50am UTC](https://discuss.elastic.co/t/issue-with-connection-message-no-address-for-stream-twitter-com/117983/2 "2018-02-03T07:50:12Z")

</div>

I have identified the issue. It depends on the docker swarm mode. But I have no idea to solve it.

If I run the container as "plain" docker container on the same host, than it works just fine. But If I include this in a stack (docker swarm service) with own overlay network this failure comes up.

Has somebody an idea how to change this or have the services:  
My stack configuration is:  
version: '3'

logstash:  
image: docker.elastic.co/logstash/logstash:6.1.3  
volumes:  
- /mnt/gluster/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml  
- /mnt/gluster/logstash/pipelines/:/usr/share/logstash/pipeline  
networks:  
- logstash  
environment:  
xpack.monitoring.enabled: "false"  
deploy:  
replicas: 1  
placement:  
constraints:  
- node.role == worker same issue with swarm mode.

networks:  
logstash:  
external: true

Thanks for your help.  
BR

---

<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:** [March 3, 2018, 7:50am UTC](https://discuss.elastic.co/t/issue-with-connection-message-no-address-for-stream-twitter-com/117983/3 "2018-03-03T07:50:18Z")

</div>

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