Logstash can't communicate with working Elasticsearch instance

I trying to start ELK stack on docker for collecting netflow data from Cisco routers and use for it blacktop/elastic, blacktop/kibana.
For logstash I modified blacktop's logstash with netflow codec plugin

Dockerfile:

FROM blacktop/logstash:latest
RUN logstash-plugin install --no-verify --version 3.2.2 logstash-codec-netflow
CMD ["-e", ""]

There is result of successfull connection test to elasticserch:

user@vkc-docker:~$ curl localhost:9200
{
"name" : "EC-xBeF",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "fcgWcaimTmSDDCcX-EAghw",
"version" : {
"number" : "5.1.2",
"build_hash" : "c8c4c16",
"build_date" : "2017-01-11T20:18:39.146Z",
"build_snapshot" : false,
"lucene_version" : "6.3.0"
},
"tagline" : "You Know, for Search"
}

But when I start logstash it says that connection to elasticsearch is refused.
Output I've posted here:

http://pastebin.com/DmASVJvD

Can everybody help me?

Unless you run the container with --net=host, localhost won't be available to the container. See e.g. http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach for more on this.

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